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

Commit 32343e6b authored by Mady Mellor's avatar Mady Mellor
Browse files

Fix snooze not dismissing when it should

Simply check whether the guts is a leavebehind, if it is allow it to
be dismissed.

Test: manual - snooze a notification, touch outside note that it disappears
             - show notification controls on a notification that will
               be removed, note that the controls remain, once 'done' is
               hit the notification is removed
Bug: 63788509
Change-Id: I42c97239f4e3e17f2e69322c94bd8e8f9d7f0737
parent dc7b2bc5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -329,4 +329,8 @@ public class NotificationGuts extends FrameLayout {
    public boolean isExposed() {
        return mExposed;
    }

    public boolean isLeavebehind() {
        return mGutsContent != null && mGutsContent.isLeavebehind();
    }
}
+2 −1
Original line number Diff line number Diff line
@@ -1790,7 +1790,8 @@ public class StatusBar extends SystemUI implements DemoMode,
            return;
        }
        if (entry != null && mNotificationGutsExposed != null
                && mNotificationGutsExposed == entry.row.getGuts()) {
                && mNotificationGutsExposed == entry.row.getGuts() && entry.row.getGuts() != null
                && !entry.row.getGuts().isLeavebehind()) {
            Log.w(TAG, "Keeping notification because it's showing guts. " + key);
            mLatestRankingMap = ranking;
            mKeyToRemoveOnGutsClosed = key;