Merge "Fix bugs regarding delay the dispatching of non-wakeup alarms"

This commit is contained in:
Christopher Tate
2014-12-12 22:11:15 +00:00
committed by Gerrit Code Review

View File

@@ -1587,7 +1587,7 @@ class AlarmManagerService extends SystemService {
if (mLastAlarmDeliveryTime <= 0) {
return false;
}
if (mPendingNonWakeupAlarms.size() > 0 && mNextNonWakeupDeliveryTime > nowELAPSED) {
if (mPendingNonWakeupAlarms.size() > 0 && mNextNonWakeupDeliveryTime < nowELAPSED) {
// This is just a little paranoia, if somehow we have pending non-wakeup alarms
// and the next delivery time is in the past, then just deliver them all. This
// avoids bugs where we get stuck in a loop trying to poll for alarms.