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 58774bedc..02d2e8e76 100644 --- a/app/src/main/java/com/android/calendar/alerts/AlertService.java +++ b/app/src/main/java/com/android/calendar/alerts/AlertService.java @@ -531,15 +531,13 @@ static int processQuery(final Cursor alertCursor, final Context context, 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