From 46824214bbe75d7e7e50cb15e3293c703d597a5f Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Fri, 28 Sep 2012 16:51:53 -0700 Subject: 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 --- services/java/com/android/server/accessibility/TouchExplorer.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/services/java/com/android/server/accessibility/TouchExplorer.java b/services/java/com/android/server/accessibility/TouchExplorer.java index 3e9bef0cac55..6e57d1f844e3 100644 --- a/services/java/com/android/server/accessibility/TouchExplorer.java +++ b/services/java/com/android/server/accessibility/TouchExplorer.java @@ -700,13 +700,6 @@ class TouchExplorer implements EventStreamTransformation { } } } break; - case MotionEvent.ACTION_POINTER_UP: { - final int pointerId = event.getPointerId(event.getActionIndex()); - if (mReceivedPointerTracker.isActiveOrWasLastActiveUpPointer(pointerId)) { - sendUpForInjectedDownPointers(event, policyFlags); - mCurrentState = STATE_TOUCH_EXPLORING; - } - } break; case MotionEvent.ACTION_UP: { // Announce the end of a new touch interaction. sendAccessibilityEvent( -- cgit v1.2.3-59-g8ed1b