Properly recognize repeating wakeup alarms
cherry-pick from lmp-mr1-dev
The code in place was inappropriately treating all recurring alarms
as non-wakeup for purposes of deferral. Worse, it was overriding the
"this deliverable batch of alarms includes a wakeup alarm" bookkeeping,
so could potentially cause inappropriate deferral of even standalone
wakeup alarms.
Bug 18591317
Change-Id: I2a62ed4badcaeb549c1ac4f086014aa829e45427
(cherry picked from commit 864d42eb96)
This commit is contained in:
committed by
Bart Sears
parent
c82392df7c
commit
8965a8da55
@@ -1425,12 +1425,9 @@ class AlarmManagerService extends SystemService {
|
|||||||
maxTriggerTime(nowELAPSED, nextElapsed, alarm.repeatInterval),
|
maxTriggerTime(nowELAPSED, nextElapsed, alarm.repeatInterval),
|
||||||
alarm.repeatInterval, alarm.operation, batch.standalone, true,
|
alarm.repeatInterval, alarm.operation, batch.standalone, true,
|
||||||
alarm.workSource, alarm.alarmClock, alarm.userId);
|
alarm.workSource, alarm.alarmClock, alarm.userId);
|
||||||
|
}
|
||||||
|
|
||||||
// For now we count this as a wakeup alarm, meaning it needs to be
|
if (alarm.wakeup) {
|
||||||
// delivered immediately. In the future we should change this, but
|
|
||||||
// that required delaying when we reschedule the repeat...!
|
|
||||||
hasWakeup = false;
|
|
||||||
} else if (alarm.wakeup) {
|
|
||||||
hasWakeup = true;
|
hasWakeup = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user