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

Commit 6e56bb4c 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

Change-Id: Ie3ed51a4fe4c6c818bc96e98c214ec7b610f507d
parents 8b3c9256 de13bcf0
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;