From bd206d129fdd1777b9f9646a834d7fc342a8941e Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Thu, 15 Sep 2011 17:33:07 -0700 Subject: Touch explorer does not perform tap with the right pointer. The touch explorer was using the id of the last pointer that went up while injecting up and down to tap through the last touch explore event incorrectly assuming that the last up pointer did touch explore. This was leading to a system crash. bug:5319315 Change-Id: Iffe8ef753795ad685abe6f493cc09adac8bfea94 --- services/java/com/android/server/accessibility/TouchExplorer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'services/java/com/android/server/accessibility/TouchExplorer.java') diff --git a/services/java/com/android/server/accessibility/TouchExplorer.java b/services/java/com/android/server/accessibility/TouchExplorer.java index aa43bb6..5875ee3 100644 --- a/services/java/com/android/server/accessibility/TouchExplorer.java +++ b/services/java/com/android/server/accessibility/TouchExplorer.java @@ -659,8 +659,8 @@ public class TouchExplorer implements Explorer { * @param policyFlags The policy flags associated with the event. */ private void sendActionDownAndUp(MotionEvent prototype, int policyFlags) { - // Tap with the pointer that last went up - we may have inactive pointers. - final int pointerId = mPointerTracker.getLastReceivedUpPointerId(); + // Tap with the pointer that last explored - we may have inactive pointers. + final int pointerId = prototype.getPointerId(prototype.getActionIndex()); final int pointerIdBits = (1 << pointerId); sendMotionEvent(prototype, MotionEvent.ACTION_DOWN, pointerIdBits, policyFlags); sendMotionEvent(prototype, MotionEvent.ACTION_UP, pointerIdBits, policyFlags); -- cgit v1.1