diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-11-17 19:16:52 -0800 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2010-11-17 19:17:54 -0800 |
commit | bfc1cc2d1ea85cc754e63b422eb8cef8ae6a3667 (patch) | |
tree | 4c9f51fea44afe8a7107ee294b5e6b7de05a195e /libs/ui | |
parent | 0fe33a4835ae3721f6302f3f2112d79e43b2b4f6 (diff) | |
download | frameworks_base-bfc1cc2d1ea85cc754e63b422eb8cef8ae6a3667.zip frameworks_base-bfc1cc2d1ea85cc754e63b422eb8cef8ae6a3667.tar.gz frameworks_base-bfc1cc2d1ea85cc754e63b422eb8cef8ae6a3667.tar.bz2 |
Fix stuck keys when released out of order. (DO NOT MERGE)
Bug: 3208156
Change-Id: I14e4d54f4912de5e2fabcd8638120623aa2d16e0
Diffstat (limited to 'libs/ui')
-rw-r--r-- | libs/ui/InputReader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ui/InputReader.cpp b/libs/ui/InputReader.cpp index d167439..3197ab2 100644 --- a/libs/ui/InputReader.cpp +++ b/libs/ui/InputReader.cpp @@ -934,7 +934,7 @@ void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t keyCode, ssize_t keyDownIndex = findKeyDownLocked(scanCode); if (keyDownIndex >= 0) { // key repeat, be sure to use same keycode as before in case of rotation - keyCode = mLocked.keyDowns.top().keyCode; + keyCode = mLocked.keyDowns.itemAt(keyDownIndex).keyCode; } else { // key down mLocked.keyDowns.push(); @@ -949,7 +949,7 @@ void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t keyCode, ssize_t keyDownIndex = findKeyDownLocked(scanCode); if (keyDownIndex >= 0) { // key up, be sure to use same keycode as before in case of rotation - keyCode = mLocked.keyDowns.top().keyCode; + keyCode = mLocked.keyDowns.itemAt(keyDownIndex).keyCode; mLocked.keyDowns.removeAt(size_t(keyDownIndex)); } else { // key was not actually down |