Skip to content

Commit 76c0dd4

Browse files
committed
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
1 parent 03e7b88 commit 76c0dd4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2042,7 +2042,7 @@ public void updateActiveWindowAndEventSourceLocked(AccessibilityEvent event) {
20422042
case AccessibilityEvent.TYPE_VIEW_HOVER_EXIT: {
20432043
mActiveWindowId = windowId;
20442044
} break;
2045-
case AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_END: {
2045+
case AccessibilityEvent.TYPE_TOUCH_INTERACTION_END: {
20462046
mActiveWindowId = getFocusedWindowId();
20472047
} break;
20482048
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,7 @@ class ReceivedPointerTracker {
16701670
*/
16711671
public ReceivedPointerTracker(Context context) {
16721672
mThresholdActivePointer =
1673-
ViewConfiguration.get(context).getScaledTouchSlop() * COEFFICIENT_ACTIVE_POINTER;//Heie govna
1673+
ViewConfiguration.get(context).getScaledTouchSlop() * COEFFICIENT_ACTIVE_POINTER;
16741674
}
16751675

16761676
/**

0 commit comments

Comments
 (0)