Skip to content

Commit ec33d56

Browse files
committed
Exception in the touch explorer when dragging.
1. During a drag in touch exploration we have two pointers moving in the same direction but inject only one of them. If the dragging pointer goes up we send an up to the view system and wait for all pointers to go up to transition to touch exploring state. At this point the dragging pointer id is cleared and if a new pointer goes down we are trying to send up (rather do nothing) for the dragging pointer which we already did and due to the invalid pointer id we get an exception when splitting the motion event. bug:7282053 Change-Id: I690bf8bdf6e2e5851ee46a322c4a1bb7d484b53a
1 parent 26884df commit ec33d56

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,9 @@ private void handleMotionEventStateDragging(MotionEvent event, int policyFlags)
645645
// We are in dragging state so we have two pointers and another one
646646
// goes down => delegate the three pointers to the view hierarchy
647647
mCurrentState = STATE_DELEGATING;
648-
sendMotionEvent(event, MotionEvent.ACTION_UP, pointerIdBits, policyFlags);
648+
if (mDraggingPointerId != INVALID_POINTER_ID) {
649+
sendMotionEvent(event, MotionEvent.ACTION_UP, pointerIdBits, policyFlags);
650+
}
649651
sendDownForAllActiveNotInjectedPointers(event, policyFlags);
650652
} break;
651653
case MotionEvent.ACTION_MOVE: {

0 commit comments

Comments
 (0)