summaryrefslogtreecommitdiffstats
path: root/services/input
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-06-29 21:20:36 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-29 21:20:36 -0700
commitd6401253183213ec6d07caae4ab778d6e1db7155 (patch)
treec7f476056c2077fc4c17d89339431f012295e878 /services/input
parent6e24576b6b10336e37c6447a5e2dbde5ea332da6 (diff)
parent2e45fb6f951d0e0c68d4211fe68108d2230814bc (diff)
downloadframeworks_base-d6401253183213ec6d07caae4ab778d6e1db7155.zip
frameworks_base-d6401253183213ec6d07caae4ab778d6e1db7155.tar.gz
frameworks_base-d6401253183213ec6d07caae4ab778d6e1db7155.tar.bz2
Merge "Fix joystick and trackpad regression."
Diffstat (limited to 'services/input')
-rw-r--r--services/input/InputDispatcher.cpp6
-rw-r--r--services/input/InputReader.cpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp
index b9029a7..85ce38a 100644
--- a/services/input/InputDispatcher.cpp
+++ b/services/input/InputDispatcher.cpp
@@ -4279,6 +4279,12 @@ bool InputDispatcher::InputState::trackMotion(const MotionEntry* entry,
memento.setPointers(entry);
return true;
}
+ if (actionMasked == AMOTION_EVENT_ACTION_MOVE
+ && (entry->source & (AINPUT_SOURCE_CLASS_JOYSTICK
+ | AINPUT_SOURCE_CLASS_NAVIGATION))) {
+ // Joysticks and trackballs can send MOVE events without corresponding DOWN or UP.
+ return true;
+ }
#if DEBUG_OUTBOUND_EVENT_DETAILS
LOGD("Dropping inconsistent motion pointer up/down or move event: "
"deviceId=%d, source=%08x, actionMasked=%d",
diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp
index 014f962..82c3af3 100644
--- a/services/input/InputReader.cpp
+++ b/services/input/InputReader.cpp
@@ -922,7 +922,7 @@ void InputDevice::process(const RawEvent* rawEvents, size_t count) {
for (const RawEvent* rawEvent = rawEvents; count--; rawEvent++) {
#if DEBUG_RAW_EVENTS
LOGD("Input event: device=%d type=0x%04x scancode=0x%04x "
- "keycode=0x%04x value=0x%04x flags=0x%08x",
+ "keycode=0x%04x value=0x%08x flags=0x%08x",
rawEvent->deviceId, rawEvent->type, rawEvent->scanCode, rawEvent->keyCode,
rawEvent->value, rawEvent->flags);
#endif