summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/accessibility/TouchExplorer.java
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2011-09-15 17:33:07 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2011-09-15 17:46:32 -0700
commitbd206d129fdd1777b9f9646a834d7fc342a8941e (patch)
tree6664a8fda63a842a76e94f7d33e075ffa42ea108 /services/java/com/android/server/accessibility/TouchExplorer.java
parent68901a3e8157db32c02386415caf0ecc9ef47c03 (diff)
downloadframeworks_base-bd206d129fdd1777b9f9646a834d7fc342a8941e.zip
frameworks_base-bd206d129fdd1777b9f9646a834d7fc342a8941e.tar.gz
frameworks_base-bd206d129fdd1777b9f9646a834d7fc342a8941e.tar.bz2
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
Diffstat (limited to 'services/java/com/android/server/accessibility/TouchExplorer.java')
-rw-r--r--services/java/com/android/server/accessibility/TouchExplorer.java4
1 files changed, 2 insertions, 2 deletions
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);