summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2015-02-05 19:24:15 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-02-05 19:26:32 +0000
commit5c2fdc331f81b671d426f3f5a7e59cd9cbed80bf (patch)
treed702b50bbd0ebcb5a74345a4eb8e40ed136f1c28 /services
parent3bbc5a113403886b16d276f2438677c5381bfab6 (diff)
parentc83d3e4b72f8f25bbac39a577f125f0ca04354da (diff)
downloadframeworks_base-5c2fdc331f81b671d426f3f5a7e59cd9cbed80bf.zip
frameworks_base-5c2fdc331f81b671d426f3f5a7e59cd9cbed80bf.tar.gz
frameworks_base-5c2fdc331f81b671d426f3f5a7e59cd9cbed80bf.tar.bz2
Merge "Always re-establish kernel alarms when considering new alarm set" into lmp-mr1-dev
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/AlarmManagerService.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/AlarmManagerService.java b/services/core/java/com/android/server/AlarmManagerService.java
index a9a756e..65a5c23 100644
--- a/services/core/java/com/android/server/AlarmManagerService.java
+++ b/services/core/java/com/android/server/AlarmManagerService.java
@@ -1230,7 +1230,8 @@ class AlarmManagerService extends SystemService {
if (mAlarmBatches.size() > 0) {
final Batch firstWakeup = findFirstWakeupBatchLocked();
final Batch firstBatch = mAlarmBatches.get(0);
- if (firstWakeup != null && mNextWakeup != firstWakeup.start) {
+ // always update the kernel alarms, as a backstop against missed wakeups
+ if (firstWakeup != null) {
mNextWakeup = firstWakeup.start;
setLocked(ELAPSED_REALTIME_WAKEUP, firstWakeup.start);
}
@@ -1243,7 +1244,8 @@ class AlarmManagerService extends SystemService {
nextNonWakeup = mNextNonWakeupDeliveryTime;
}
}
- if (nextNonWakeup != 0 && mNextNonWakeup != nextNonWakeup) {
+ // always update the kernel alarm, as a backstop against missed wakeups
+ if (nextNonWakeup != 0) {
mNextNonWakeup = nextNonWakeup;
setLocked(ELAPSED_REALTIME, nextNonWakeup);
}