From aed4b6f812674bc60a04470013ca449e5c114fa5 Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Fri, 28 Sep 2012 10:06:18 -0700 Subject: [PATCH] Inconsistent events on transition from gesture detection to touch exploration. 1. The problem is that we have a gesture detection timeout after which we transition to touch exploration state. This handles the case where the user is using too high velocity while trying to touch explore. The delayed command that transitions from gesture detection state to touch exploration state was not firing an event for the end of gesture detection and begin of touch exploration before doing its main work to transition to touch exploring state. bug:7233819 Change-Id: I5c4855231aa3826dadbee324e74a3c9e52c96cd9 --- .../java/com/android/server/accessibility/TouchExplorer.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/java/com/android/server/accessibility/TouchExplorer.java b/services/java/com/android/server/accessibility/TouchExplorer.java index 921bed7c6c8ca..542cc07a46a1f 100644 --- a/services/java/com/android/server/accessibility/TouchExplorer.java +++ b/services/java/com/android/server/accessibility/TouchExplorer.java @@ -1300,6 +1300,11 @@ class TouchExplorer implements EventStreamTransformation { @Override public void run() { + // Announce the end of gesture recognition. + sendAccessibilityEvent(AccessibilityEvent.TYPE_GESTURE_DETECTION_END); + // Clearing puts is in touch exploration state with a finger already + // down, so announce the transition to exploration state. + sendAccessibilityEvent(AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_START); clear(); } }