Make the buttons work for edge pixels of the keyboard
Follow-up change to If7630b89 bug: 3142416 Change-Id: I2660e3d688eb0490363e460d5b4944c89b8ca35cmain
parent
9dce586eaa
commit
69db35c493
|
@ -797,7 +797,9 @@ public class LatinKeyboard extends Keyboard {
|
|||
if (mCurrentlyInSpace) {
|
||||
return new int[] { mSpaceKeyIndex };
|
||||
} else {
|
||||
return super.getNearestKeys(x, y);
|
||||
// Avoid dead pixels at edges of the keyboard
|
||||
return super.getNearestKeys(Math.max(0, Math.min(x, getMinWidth() - 1)),
|
||||
Math.max(0, Math.min(y, getHeight() - 1)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -83,4 +83,4 @@ class ProximityKeyDetector extends KeyDetector {
|
|||
}
|
||||
return primaryIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue