summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2010-03-04 16:00:29 -0800
committerChristopher Tate <ctate@google.com>2010-03-04 16:00:29 -0800
commit2032f98f8c6176be7819bd3bc4459a05542c5b85 (patch)
tree53a9ca87925a684228549f8a8efbc121945378d0 /libs
parent5c8a613f7ed66ccdfa40305e969c9b6b0e046397 (diff)
downloadframeworks_native-2032f98f8c6176be7819bd3bc4459a05542c5b85.zip
frameworks_native-2032f98f8c6176be7819bd3bc4459a05542c5b85.tar.gz
frameworks_native-2032f98f8c6176be7819bd3bc4459a05542c5b85.tar.bz2
Fix #2489986 : The key bitmask needs to cover all possible keys
Change-Id: Ieebd2f879e6b6fbc0388655dd66f34be89e809a0
Diffstat (limited to 'libs')
-rw-r--r--libs/ui/EventHub.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp
index 57192a5..34cd9d1 100644
--- a/libs/ui/EventHub.cpp
+++ b/libs/ui/EventHub.cpp
@@ -608,7 +608,7 @@ int EventHub::open_device(const char *deviceName)
// consider up through the function keys; we don't want to include
// ones after that (play cd etc) so we don't mistakenly consider a
// controller to be a keyboard.
- uint8_t key_bitmask[(KEY_PLAYCD+1)/8];
+ uint8_t key_bitmask[(KEY_MAX+1)/8];
memset(key_bitmask, 0, sizeof(key_bitmask));
LOGV("Getting keys...");
if (ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask) >= 0) {