From 19a214a1f277f6d7b9ab3e0c948d3682311227c0 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Mon, 15 Apr 2024 02:29:38 +0000 Subject: [PATCH] 6430-s-Clear_notification_after_event_ends --- .../com/android/calendar/alerts/AlertService.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/android/calendar/alerts/AlertService.java b/app/src/main/java/com/android/calendar/alerts/AlertService.java index 38db5a31a..ccc5de3ad 100644 --- a/app/src/main/java/com/android/calendar/alerts/AlertService.java +++ b/app/src/main/java/com/android/calendar/alerts/AlertService.java @@ -529,15 +529,13 @@ public class AlertService extends Service { int newState = -1; boolean newAlert = false; - // Uncomment for the behavior of clearing out alerts after the - // events ended. b/1880369 - // - // if (endTime < currentTime) { - // newState = CalendarAlerts.DISMISSED; - // } else + // clearing out alerts after the events ended. b/1880369 + if (endTime < currentTime) { + newState = CalendarAlerts.STATE_DISMISSED; + } // Remove declined events - boolean sendAlert = !declined; + boolean sendAlert = !declined && newState != CalendarAlerts.STATE_DISMISSED; // Check for experimental reminder settings. if (remindRespondedOnly) { // If the experimental setting is turned on, then only send -- GitLab