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

Commit da469277 authored by Phil Weaver's avatar Phil Weaver
Browse files

Behave if the same view gets a11y focus twice.

In some corner cases, ViewRootImpl#setAccessibilityFocus
can be called twice for the same view. Make sure we're
actually changing views before clearing accessibility focus
to avoid inconsistent state.

Bug: 29637593
Change-Id: I5dc6f05bdeaec55c352417bfca92c11bd03c3c10
parent 4822a4e4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3186,7 +3186,7 @@ public final class ViewRootImpl implements ViewParent,
            }
            focusNode.recycle();
        }
        if (mAccessibilityFocusedHost != null) {
        if ((mAccessibilityFocusedHost != null) && (mAccessibilityFocusedHost != view))  {
            // Clear accessibility focus in the view.
            mAccessibilityFocusedHost.clearAccessibilityFocusNoCallbacks(
                    AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS);