Bug 758427 - Ignore KeyEvents with keyCodes greater than getMaxKeyCode(), such as Gingerbread Galaxy Note's bogus stylus events. r=blassey

This commit is contained in:
Chris Peterson 2012-06-28 11:03:53 -07:00
parent 7db6803233
commit 7b5896264c

View File

@ -876,6 +876,9 @@ public class GeckoInputConnection
+ isPreIme + ")");
}
if (keyCode > KeyEvent.getMaxKeyCode())
return false;
clampSelection();
switch (keyCode) {
@ -935,6 +938,9 @@ public class GeckoInputConnection
+ isPreIme + ")");
}
if (keyCode > KeyEvent.getMaxKeyCode())
return false;
switch (keyCode) {
case KeyEvent.KEYCODE_BACK:
case KeyEvent.KEYCODE_SEARCH: