Skip to content

Commit

Permalink
[M120 Canary][Auto-disable Accessibility] Fix for recreate issue from…
Browse files Browse the repository at this point in the history
… touch exploration

This CL implements a safer/alternative fix to the infinite recreate
issue that is caused by a mismatch in isTouchExplorationEnabled checks
for certain AT. With this CL we update the Chrome state to always
point to the Android state so that there is never a mismatch.

Bug: 1491862
Change-Id: I7dd9ae9cd21891ceec0a4fdd4bf34569446e7c65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4938383
Reviewed-by: Krishna Govind <govind@chromium.org>
Owners-Override: Krishna Govind <govind@chromium.org>
Cr-Commit-Position: refs/branch-heads/6065@{#5}
Cr-Branched-From: fd6df10-refs/heads/main@{#1209401}
  • Loading branch information
mschillaci authored and Krishna Govind committed Oct 13, 2023
1 parent b730da6 commit 21476cd
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import static android.accessibilityservice.AccessibilityServiceInfo.CAPABILITY_CAN_PERFORM_GESTURES;
import static android.accessibilityservice.AccessibilityServiceInfo.FEEDBACK_SPOKEN;
import static android.accessibilityservice.AccessibilityServiceInfo.FLAG_REQUEST_TOUCH_EXPLORATION_MODE;
import static android.view.accessibility.AccessibilityManager.FLAG_CONTENT_CONTROLS;
import static android.view.accessibility.AccessibilityManager.FLAG_CONTENT_ICONS;
import static android.view.accessibility.AccessibilityManager.FLAG_CONTENT_TEXT;
Expand Down Expand Up @@ -647,8 +646,7 @@ static void updateAccessibilityServices() {
boolean isScreenReaderEnabled =
(0 != (screenReaderCheckEventTypeMask & SCREEN_READER_EVENT_TYPE_MASK));
boolean isSpokenFeedbackServicePresent = (0 != (sFeedbackTypeMask & FEEDBACK_SPOKEN));
boolean isTouchExplorationEnabled =
(0 != (sFlagsMask & FLAG_REQUEST_TOUCH_EXPLORATION_MODE));
boolean isTouchExplorationEnabled = sAccessibilityManager.isTouchExplorationEnabled();
boolean isPerformGesturesEnabled =
(0 != (sCapabilitiesMask & CAPABILITY_CAN_PERFORM_GESTURES));
updateAndNotifyStateChange(new State(isScreenReaderEnabled, isTouchExplorationEnabled,
Expand Down

0 comments on commit 21476cd

Please sign in to comment.