From 8d4dfd25f7329d0cdcc8dda8bdfadd7ebec3b3a4 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Tue, 10 Aug 2010 15:47:53 -0700 Subject: Fix safe mode and KeyEvent.getMaxKeyCode(). Bug: 2901731 Change-Id: I78617c1b9dee3790fc590e5af4b5083368873184 --- libs/ui/InputReader.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libs/ui') diff --git a/libs/ui/InputReader.cpp b/libs/ui/InputReader.cpp index 6618702..5f5a4ac 100644 --- a/libs/ui/InputReader.cpp +++ b/libs/ui/InputReader.cpp @@ -1080,6 +1080,14 @@ void TrackballInputMapper::applyPolicyAndDispatch(nsecs_t when, int32_t motionEv 1, & pointerId, pointerCoords, mXPrecision, mYPrecision, downTime); } +int32_t TrackballInputMapper::getScanCodeState(uint32_t sourceMask, int32_t scanCode) { + if (scanCode >= BTN_MOUSE && scanCode < BTN_JOYSTICK) { + return getEventHub()->getScanCodeState(getDeviceId(), scanCode); + } else { + return AKEY_STATE_UNKNOWN; + } +} + // --- TouchInputMapper --- -- cgit v1.1