Bug 762968 - Part 1: Ignore bogus stylus events in onKeyDown(). r=cpeterson

--HG--
extra : rebase_source : 75267b1bffe981fe5e60477018e9c86677742cb8
This commit is contained in:
Brian Nicholson 2012-06-28 11:15:17 -07:00
Родитель 543ec7adc0
Коммит 456b3d687f
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -353,6 +353,11 @@ public class AwesomeBar extends GeckoActivity implements GeckoEventListener {
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
// Galaxy Note sends key events for the stylus that are outside of the
// valid keyCode range (see bug 758427)
if (keyCode > KeyEvent.getMaxKeyCode())
return true;
// This method is called only if the key event was not handled
// by any of the views, which usually means the edit box lost focus
if (keyCode == KeyEvent.KEYCODE_BACK ||