diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-09-27 21:00:44 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-27 21:00:44 -0700 |
commit | 26d5786fb1a43d82b40fa908e1220a018b748c93 (patch) | |
tree | c1ada95d8329e58d7df8793f52f9754ca0e8e338 /libs | |
parent | 1738252a596c71851cabf5835acb3584ad6b3191 (diff) | |
parent | 9c37447e5c3555e4063777e4ef82e355e57f4c68 (diff) | |
download | frameworks_base-26d5786fb1a43d82b40fa908e1220a018b748c93.zip frameworks_base-26d5786fb1a43d82b40fa908e1220a018b748c93.tar.gz frameworks_base-26d5786fb1a43d82b40fa908e1220a018b748c93.tar.bz2 |
am 9c37447e: Merge "Fix pointer index when splitting secondary pointers." into gingerbread
Merge commit '9c37447e5c3555e4063777e4ef82e355e57f4c68' into gingerbread-plus-aosp
* commit '9c37447e5c3555e4063777e4ef82e355e57f4c68':
Fix pointer index when splitting secondary pointers.
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. |