Do not allow multiple snooze menus to be open at once

Fixes: 187480963
Test: manual snoozing of multiple notifications
Change-Id: I83a8e697c35b2eb0bb00320628bb42c1b4aeb5e7
This commit is contained in:
Jeff DeCew
2021-05-19 14:18:17 -04:00
parent f8894a8664
commit 85a3199435

View File

@@ -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);
};
}