From 76c0dd48279531cb31e2a284a270c535664cbf81 Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Mon, 24 Sep 2012 19:16:16 -0700 Subject: [PATCH] The active window for accessibilitiy incorrectly tracked. 1. The active window for accessibility purposes is the either the window the user is touching or the window that has input focus. We were using the touch exploration gesture end event to figure when the user stops touching the screen so we can set the active window to the input focused one. However, we do not send such gesture end if the user does not touch explore. If the user only taps we do not consider this touch exploring. We now have dedicated accessibility events for first and last touch and this change uses them as a guide when to update the active window. bug:6523219 Change-Id: I6262c0c5f408b02dbaa127664e4b426935d7f81f --- .../server/accessibility/AccessibilityManagerService.java | 2 +- .../java/com/android/server/accessibility/TouchExplorer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java index 20c89ad00a21b..3c29907487923 100644 --- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -2042,7 +2042,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { case AccessibilityEvent.TYPE_VIEW_HOVER_EXIT: { mActiveWindowId = windowId; } break; - case AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_END: { + case AccessibilityEvent.TYPE_TOUCH_INTERACTION_END: { mActiveWindowId = getFocusedWindowId(); } break; } diff --git a/services/java/com/android/server/accessibility/TouchExplorer.java b/services/java/com/android/server/accessibility/TouchExplorer.java index 0468b4dc7d492..921bed7c6c8ca 100644 --- a/services/java/com/android/server/accessibility/TouchExplorer.java +++ b/services/java/com/android/server/accessibility/TouchExplorer.java @@ -1670,7 +1670,7 @@ class TouchExplorer implements EventStreamTransformation { */ public ReceivedPointerTracker(Context context) { mThresholdActivePointer = - ViewConfiguration.get(context).getScaledTouchSlop() * COEFFICIENT_ACTIVE_POINTER;//Heie govna + ViewConfiguration.get(context).getScaledTouchSlop() * COEFFICIENT_ACTIVE_POINTER; } /**