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

Commit 85d18cce authored by Phil Weaver's avatar Phil Weaver Committed by Android (Google) Code Review
Browse files

Merge "Stop double notifying a11y about Toasts." into nyc-mr1-dev

parents a2153e62 532c7999
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;