summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrashant Malani <pmalani@google.com>2015-06-26 21:12:49 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-26 21:12:49 +0000
commitb3d02465f859dbe62b14c787c7de966abd6c7381 (patch)
tree8b6cc9cdc3c475fbba8a90f7c02bfb4b4c1fd4b3
parentcf05e31866e94eb9d8a6f0ee1fb9960ba169e2c1 (diff)
parent9a3eacbe9ce0e6a65429c721b6f4e60a28dbdaab (diff)
downloadframeworks_base-b3d02465f859dbe62b14c787c7de966abd6c7381.zip
frameworks_base-b3d02465f859dbe62b14c787c7de966abd6c7381.tar.gz
frameworks_base-b3d02465f859dbe62b14c787c7de966abd6c7381.tar.bz2
am 9a3eacbe: Merge "Revert "Always re-establish kernel alarms when considering new alarm set"" into cw-d-mr1-dev
* commit '9a3eacbe9ce0e6a65429c721b6f4e60a28dbdaab': 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 7d156df..45fa373 100644
--- a/services/core/java/com/android/server/AlarmManagerService.java
+++ b/services/core/java/com/android/server/AlarmManagerService.java
@@ -1230,8 +1230,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);
}
@@ -1244,8 +1243,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);
}