Follow-up fix for I68c667b0
Should have preserved the logic of LatinKeyboard.getNearestKeys(). Change-Id: I97b05aa24006402be03088a215fa07abda9477dfmain
parent
42fcb2de64
commit
4f7d278af6
|
@ -403,7 +403,10 @@ public class Keyboard {
|
||||||
* point is out of range, then an array of size zero is returned.
|
* point is out of range, then an array of size zero is returned.
|
||||||
*/
|
*/
|
||||||
public Key[] getNearestKeys(int x, int y) {
|
public Key[] getNearestKeys(int x, int y) {
|
||||||
return mProximityInfo.getNearestKeys(x, y);
|
// Avoid dead pixels at edges of the keyboard
|
||||||
|
final int adjustedX = Math.max(0, Math.min(x, mOccupiedWidth - 1));
|
||||||
|
final int adjustedY = Math.max(0, Math.min(y, mOccupiedHeight - 1));
|
||||||
|
return mProximityInfo.getNearestKeys(adjustedX, adjustedY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String printableCode(int code) {
|
public static String printableCode(int code) {
|
||||||
|
|
Loading…
Reference in New Issue