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

Commit 6713ec0c authored by Justin Klaassen's avatar Justin Klaassen
Browse files

Write STATE_DELETED prior to deleting timer instances

Bug: 25220599

By writing STATE_DELETED to shared prefs prior to deleting the timer
instance, listeners have a chance to react to the state change and can
still successfully instantiate the TimerObj.

Change-Id: Ic33da9de715e22f4aac9b861afc0708ba08a01ec
parent 9c6ac599
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -296,6 +296,7 @@ public class TimerReceiver extends BroadcastReceiver {

        if (t.mDeleteAfterUse) {
            t.setState(TimerObj.STATE_DELETED);
            t.writeToSharedPref(prefs);
            t.deleteFromSharedPref(prefs);
            Events.sendTimerEvent(R.string.action_delete, R.string.label_notification);
        } else {