Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e2b6438 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Fix accessibility state callbacks" into klp-dev

parents 4ca2aec2 7e361d22
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -415,14 +415,18 @@ public final class AccessibilityManager {
        final boolean touchExplorationEnabled =
                (stateFlags & STATE_FLAG_TOUCH_EXPLORATION_ENABLED) != 0;
        synchronized (mHandler) {
            final boolean wasEnabled = mIsEnabled;
            final boolean wasTouchExplorationEnabled = mIsTouchExplorationEnabled;

            // Ensure listeners get current state from isZzzEnabled() calls.
            mIsEnabled = enabled;
            mIsTouchExplorationEnabled = touchExplorationEnabled;

            if (enabled != mIsEnabled) {
            if (wasEnabled != enabled) {
                notifyAccessibilityStateChangedLh();
            }

            if (touchExplorationEnabled != mIsTouchExplorationEnabled) {
            if (wasTouchExplorationEnabled != touchExplorationEnabled) {
                notifyTouchExplorationStateChangedLh();
            }
        }