diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/AlarmManagerService.java | 6 |
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); } |