Skip to content

Commit 4682421

Browse files
committed
Sending interaction end event at the end of a drag.
1. In explore-by-touch when the user slides two fingers in the same direction we consider it a drag gesture. We merge the pointers into one and deliver a touch event. When one of the pointers goes up we were transitioning into touch exploring state. This means that were transitioning to another state in the middle of a gesture which creates complications and leads for interaction end event not being sent. This change transitions out of dragging state when all pointers go up - simple and all events are properly sent. Consequentially, staring a drag the user has to lift all pointers to touch explore. Since usually users either drags or touch explores this seems the simplest and *least risky* fix. bug:7253731 Change-Id: Ie8588fbe9b26cb81312bd7fd377c94732e41e3f8
1 parent 925a659 commit 4682421

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -700,13 +700,6 @@ private void handleMotionEventStateDragging(MotionEvent event, int policyFlags)
700700
}
701701
}
702702
} break;
703-
case MotionEvent.ACTION_POINTER_UP: {
704-
final int pointerId = event.getPointerId(event.getActionIndex());
705-
if (mReceivedPointerTracker.isActiveOrWasLastActiveUpPointer(pointerId)) {
706-
sendUpForInjectedDownPointers(event, policyFlags);
707-
mCurrentState = STATE_TOUCH_EXPLORING;
708-
}
709-
} break;
710703
case MotionEvent.ACTION_UP: {
711704
// Announce the end of a new touch interaction.
712705
sendAccessibilityEvent(

0 commit comments

Comments
 (0)