Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4299c8c authored by Daria Evdokimova's avatar Daria Evdokimova Committed by Android (Google) Code Review
Browse files

Merge "Change the toggle to off when DISMISS'ing 1 time alarms" into ub-deskclock-business

parents 61773fcb 3d969193
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -559,6 +559,15 @@ public final class AlarmStateManager extends BroadcastReceiver {
        AlarmNotifications.clearNotification(context, instance);
        scheduleInstanceStateChange(context, instance.getAlarmTime(), instance,
                AlarmInstance.DISMISSED_STATE);

        final Alarm alarm = Alarm.getAlarm(contentResolver, instance.mAlarmId);
        // if it's a one time alarm set the toggle to off
        if (alarm != null && !alarm.daysOfWeek.isRepeating()) {
            // Check parent if it needs to reschedule, disable or delete itself
            if (instance.mAlarmId != null) {
                updateParentAlarm(context, instance);
            }
        }
    }

    /**