summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-09-28 12:47:13 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-28 12:47:13 -0700
commitc188062eb6c44c05d24aeb207df4d7e5dbdf089e (patch)
tree9a848df35cf0f4c984cd2cb29245157c5dbefa26 /libs
parent40f45eeeb4914511c0d4d749d1f4c768e82b79a3 (diff)
parent26d5786fb1a43d82b40fa908e1220a018b748c93 (diff)
downloadframeworks_base-c188062eb6c44c05d24aeb207df4d7e5dbdf089e.zip
frameworks_base-c188062eb6c44c05d24aeb207df4d7e5dbdf089e.tar.gz
frameworks_base-c188062eb6c44c05d24aeb207df4d7e5dbdf089e.tar.bz2
am 26d5786f: am 9c37447e: Merge "Fix pointer index when splitting secondary pointers." into gingerbread
Merge commit '26d5786fb1a43d82b40fa908e1220a018b748c93' * commit '26d5786fb1a43d82b40fa908e1220a018b748c93': Fix pointer index when splitting secondary pointers.
Diffstat (limited to 'libs')
-rw-r--r--libs/ui/InputDispatcher.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp
index 9e78a4a..8db8c42 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.