summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrashant Malani <pmalani@google.com>2015-06-26 23:06:53 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-26 23:06:53 +0000
commitb29eeb5af148097bf55c22a4ce3b040ad2ecc792 (patch)
treeef9d40ed47622598c66723f72ff0efeee3b9ee0e
parent71647af1ee991c278f00b622ad6fb7ed9c227e0e (diff)
parentb3d02465f859dbe62b14c787c7de966abd6c7381 (diff)
downloadframeworks_base-b29eeb5af148097bf55c22a4ce3b040ad2ecc792.zip
frameworks_base-b29eeb5af148097bf55c22a4ce3b040ad2ecc792.tar.gz
frameworks_base-b29eeb5af148097bf55c22a4ce3b040ad2ecc792.tar.bz2
am b3d02465: am 9a3eacbe: Merge "Revert "Always re-establish kernel alarms when considering new alarm set"" into cw-d-mr1-dev
* commit 'b3d02465f859dbe62b14c787c7de966abd6c7381': Revert "Always re-establish kernel alarms when considering new alarm set"
-rw-r--r--services/core/java/com/android/server/AlarmManagerService.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/AlarmManagerService.java b/services/core/java/com/android/server/AlarmManagerService.java
index 839b87a..d58d372 100644
--- a/services/core/java/com/android/server/AlarmManagerService.java
+++ b/services/core/java/com/android/server/AlarmManagerService.java
@@ -1611,8 +1611,7 @@ class AlarmManagerService extends SystemService {
if (mAlarmBatches.size() > 0) {
final Batch firstWakeup = findFirstWakeupBatchLocked();
final Batch firstBatch = mAlarmBatches.get(0);
- // always update the kernel alarms, as a backstop against missed wakeups
- if (firstWakeup != null) {
+ if (firstWakeup != null && mNextWakeup != firstWakeup.start) {
mNextWakeup = firstWakeup.start;
setLocked(ELAPSED_REALTIME_WAKEUP, firstWakeup.start);
}
@@ -1625,8 +1624,7 @@ class AlarmManagerService extends SystemService {
nextNonWakeup = mNextNonWakeupDeliveryTime;
}
}
- // always update the kernel alarm, as a backstop against missed wakeups
- if (nextNonWakeup != 0) {
+ if (nextNonWakeup != 0 && mNextNonWakeup != nextNonWakeup) {
mNextNonWakeup = nextNonWakeup;
setLocked(ELAPSED_REALTIME, nextNonWakeup);
}