diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-09-27 16:35:11 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2010-09-27 20:54:28 -0700 |
commit | ffb16d601b81c0a7559f601c4df8dbaea5947016 (patch) | |
tree | dc6b1742708be90447a29e4c3f8a5d37f49cbc3b /libs | |
parent | 6e0e4c4f119a4370a33e0bae6e289cf1470be307 (diff) | |
download | frameworks_native-ffb16d601b81c0a7559f601c4df8dbaea5947016.zip frameworks_native-ffb16d601b81c0a7559f601c4df8dbaea5947016.tar.gz frameworks_native-ffb16d601b81c0a7559f601c4df8dbaea5947016.tar.bz2 |
Fix pointer index when splitting secondary pointers.
Change-Id: Ib01e810ea5b64501b1303000bbef0f0a1db2114e
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ui/InputDispatcher.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp index 5da1676..b5744b3 100644 --- a/libs/ui/InputDispatcher.cpp +++ b/libs/ui/InputDispatcher.cpp @@ -1916,6 +1916,14 @@ InputDispatcher::splitMotionEvent(const MotionEntry* originalMotionEntry, BitSet // The first/last pointer went down/up. action = maskedAction == AMOTION_EVENT_ACTION_POINTER_DOWN ? AMOTION_EVENT_ACTION_DOWN : AMOTION_EVENT_ACTION_UP; + } else { + // A secondary pointer went down/up. + uint32_t splitPointerIndex = 0; + while (pointerId != splitPointerIds[splitPointerIndex]) { + splitPointerIndex += 1; + } + action = maskedAction | (splitPointerIndex + << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT); } } else { // An unrelated pointer changed. |