diff options
author | Christopher Tate <ctate@google.com> | 2014-12-02 11:48:53 -0800 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2014-12-11 18:03:19 -0800 |
commit | 5a995f968ca0e5c9701e36f0240b4708ea69c78d (patch) | |
tree | b1a963a0bebb0e64645d7f660645071636dac675 | |
parent | 4f868ed4f5f6da09c5c535a50ef6ab308303e070 (diff) | |
download | base-5a995f968ca0e5c9701e36f0240b4708ea69c78d.tar.gz |
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 864d42eb96a9127b7d2f10ad11e709c24b4b4304)
-rw-r--r-- | services/core/java/com/android/server/AlarmManagerService.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/AlarmManagerService.java b/services/core/java/com/android/server/AlarmManagerService.java index 8b524ddab458..9d6ccfb03882 100644 --- a/services/core/java/com/android/server/AlarmManagerService.java +++ b/services/core/java/com/android/server/AlarmManagerService.java @@ -1425,12 +1425,9 @@ class AlarmManagerService extends SystemService { maxTriggerTime(nowELAPSED, nextElapsed, alarm.repeatInterval), alarm.repeatInterval, alarm.operation, batch.standalone, true, alarm.workSource, alarm.alarmClock, alarm.userId); + } - // For now we count this as a wakeup alarm, meaning it needs to be - // delivered immediately. In the future we should change this, but - // that required delaying when we reschedule the repeat...! - hasWakeup = false; - } else if (alarm.wakeup) { + if (alarm.wakeup) { hasWakeup = true; } |