Skip to content

Commit bd206d1

Browse files
committed
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
1 parent 68901a3 commit bd206d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/java/com/android/server/accessibility/TouchExplorer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,8 @@ private void sendMotionEventStripInactivePointers(MotionEvent prototype, int pol
659659
* @param policyFlags The policy flags associated with the event.
660660
*/
661661
private void sendActionDownAndUp(MotionEvent prototype, int policyFlags) {
662-
// Tap with the pointer that last went up - we may have inactive pointers.
663-
final int pointerId = mPointerTracker.getLastReceivedUpPointerId();
662+
// Tap with the pointer that last explored - we may have inactive pointers.
663+
final int pointerId = prototype.getPointerId(prototype.getActionIndex());
664664
final int pointerIdBits = (1 << pointerId);
665665
sendMotionEvent(prototype, MotionEvent.ACTION_DOWN, pointerIdBits, policyFlags);
666666
sendMotionEvent(prototype, MotionEvent.ACTION_UP, pointerIdBits, policyFlags);

0 commit comments

Comments
 (0)