From 6c23545ab1b05c1512669e0e0f2a85683624e547 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Tue, 9 Apr 2024 15:28:50 +0600 Subject: [PATCH] feat: Remove notification after the event ended. issue: https://gitlab.e.foundation/e/backlog/-/issues/6430 --- .../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