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

Commit 200adfbe authored by Svetoslav Ganov's avatar Svetoslav Ganov
Browse files

Catch a missed case when adding a toast

We allow a single toast window per UID. It is possible that
the UID had another toast window that is going away and this
CL adds a catch all check as there was a case missing.

Change-Id: I4c68e7212a05ce349e6e5b1cffe6e36d429aaca0
parent 4bd26bef
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1121,8 +1121,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
        for (int i = 0; i < windowCount; i++) {
            final WindowState window = mWindows.get(i);
            if (window.mAttrs.type == TYPE_TOAST && window.mOwnerUid == uid
                    && !window.mPermanentlyHidden && !window.mAnimatingExit
                    && !window.mRemoveOnExit) {
                    && !window.mPermanentlyHidden && !window.mWindowRemovalAllowed) {
                return false;
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -488,7 +488,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
     * or some other higher level component said so (e.g. activity manager).
     * TODO: We should either have different booleans for the removal reason or use a bit-field.
     */
    private boolean mWindowRemovalAllowed;
    boolean mWindowRemovalAllowed;

    /**
     * Temp for keeping track of windows that have been removed when