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

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

Stop double notifying a11y about Toasts.

am: 532c7999

Change-Id: If8d025884b8a941386cd472403c1c93fee5a70af
parents 6ae3d3ea 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;