Merge "Always re-establish kernel alarms when considering new alarm set" into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5c2fdc331f
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user