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

Skip to content
Commit 769b85e1 authored by d34d's avatar d34d Committed by Clark Scheff
Browse files

Fix rescheduling of alarms that are snoozed

When AlarmInitReceiver recieves android.intent.action.TIME_SET, a
call is made to AlarmStateManager.fixAlarmInstances() which will
update all alarm instances based on the newly set time.  This updates
the AlarmInstance based on the Alarm time and not the current time
for the given AlarmInstance.  This causes snoozed alarms to be
scheduled the next time the Alarm is suppose to fire off, if the
alarm a repeating alarm.  This patch fixes this behavior by passing
in a Calendar instance based on the AlarmInstance's time.

Steps to repro:
1) Set an alarm for 1 minute from current time
2) Snooze alarm when it goes off
3) Go to Settings -> Date & Time and set the time to 2 minutes ahead
4) The snoozed alarm should be rescheduled to the next day the alarm
   would fire.

Change-Id: Id7e2d5c7b5d2b9d3b92eb51a2e14d70639d56761
(cherry picked from commit d815eef9)
Issue-Id: CYNGNOS-420
parent 20dd2b3e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment