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

Commit 93521c00 authored by Phil Weaver's avatar Phil Weaver Committed by android-build-merger
Browse files

Stop double notifying a11y about Toasts. am: 532c7999 am: de13bcf0

am: 6e56bb4c

Change-Id: Ia95d2eb44f3deee794986a420a622fb1c7de9e15
parents d22a9a22 6e56bb4c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2167,8 +2167,13 @@ public final class ViewRootImpl implements ViewParent,
        }

        if (changedVisibility || regainedFocus) {
            // Toasts are presented as notifications - don't present them as windows as well
            boolean isToast = (mWindowAttributes == null) ? false
                    : (mWindowAttributes.type == WindowManager.LayoutParams.TYPE_TOAST);
            if (!isToast) {
                host.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
            }
        }

        mFirst = false;
        mWillDrawSoon = false;