From 85a3199435163490ece4fc7a43b58a0ba806e493 Mon Sep 17 00:00:00 2001 From: Jeff DeCew Date: Wed, 19 May 2021 14:18:17 -0400 Subject: [PATCH] Do not allow multiple snooze menus to be open at once Fixes: 187480963 Test: manual snoozing of multiple notifications Change-Id: I83a8e697c35b2eb0bb00320628bb42c1b4aeb5e7 --- .../statusbar/notification/row/ExpandableNotificationRow.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java index 206f9db292e1d..4299cfd4e7212 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java @@ -1102,6 +1102,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView /** The click listener for the snooze button. */ public View.OnClickListener getSnoozeClickListener(MenuItem item) { return v -> { + // Dismiss a snoozed notification if one is still left behind + mNotificationGutsManager.closeAndSaveGuts(true /* removeLeavebehind */, + false /* force */, false /* removeControls */, -1 /* x */, -1 /* y */, + false /* resetMenu */); mNotificationGutsManager.openGuts(this, 0, 0, item); }; }