Skip to content

Commit

Permalink
Fix bugs regarding delay the dispatching of non-wakeup alarms
Browse files Browse the repository at this point in the history
checkAllowNonWakeupDelayLocked() method determines that delay the dispatching of non-wakeup alarms.
(there are no wakeup alarms and the screen is off, it can delay until the future.)

if there is any pending non-wakeup alarms, non-wakeup alarm delivery time is bigger than nowELAPSED.
but, checkAllowNonWakeupDelayLocked() returns false and non-wakeup alarm is not delay until future.

i think it is necessary to reverse the inequality symbol on "mNextNonWakeupDeliveryTime > nowELAPSED"
if it isn't, Could you let me know when we get ¡°stuck in a loop¡± in the comment of checkAllowNonWakeupDelayLocked () method?

Change-Id: I7e972064547f4d0a9b4175dbd4cf735b4837abfd
Signed-off-by: Minho Choo <minho.choo@lge.com>
  • Loading branch information
minho1105 authored and Chairshot215 committed Jan 13, 2015
1 parent 7db1192 commit b291365
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -1584,7 +1584,7 @@ boolean checkAllowNonWakeupDelayLocked(long nowELAPSED) {
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.
Expand Down

0 comments on commit b291365

Please sign in to comment.