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

Commit 23301afb authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed an issue where heads-upped notifications would stay

If a heads up notification was briefly removed right after
it was added it could linger around in systemUI until
the panel collapsed.
We need to make sure not to apply this improvement if
reordering isn't allowed, otherwise it will never time out

Test: existing tests pass
Bug: 34608075
Merged-In: I7768f6111ada30edcb997a42940e5e336efe1cf2
Change-Id: I7768f6111ada30edcb997a42940e5e336efe1cf2
parent 66d545bf
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1582,8 +1582,11 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        if (mHeadsUpManager.isHeadsUp(key)) {
            // A cancel() in repsonse to a remote input shouldn't be delayed, as it makes the
            // sending look longer than it takes.
            // Also we should not defer the removal if reordering isn't allowed since otherwise
            // some notifications can't disappear before the panel is closed.
            boolean ignoreEarliestRemovalTime = mRemoteInputController.isSpinning(key)
                    && !FORCE_REMOTE_INPUT_HISTORY;
                    && !FORCE_REMOTE_INPUT_HISTORY
                        || !mVisualStabilityManager.isReorderingAllowed();
            deferRemoval = !mHeadsUpManager.removeNotification(key,  ignoreEarliestRemovalTime);
        }
        if (key.equals(mMediaNotificationKey)) {