Loading services/core/java/com/android/server/AlarmManagerService.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -2458,9 +2458,9 @@ class AlarmManagerService extends SystemService { expectedClockTime = lastTimeChangeClockTime expectedClockTime = lastTimeChangeClockTime + (nowELAPSED - mLastTimeChangeRealtime); + (nowELAPSED - mLastTimeChangeRealtime); } } if (lastTimeChangeClockTime == 0 || nowRTC < (expectedClockTime-500) if (lastTimeChangeClockTime == 0 || nowRTC < (expectedClockTime-1000) || nowRTC > (expectedClockTime+500)) { || nowRTC > (expectedClockTime+1000)) { // The change is by at least +/- 500 ms (or this is the first change), // The change is by at least +/- 1000 ms (or this is the first change), // let's do it! // let's do it! if (DEBUG_BATCH) { if (DEBUG_BATCH) { Slog.v(TAG, "Time changed notification from kernel; rebatching"); Slog.v(TAG, "Time changed notification from kernel; rebatching"); Loading @@ -2477,7 +2477,8 @@ class AlarmManagerService extends SystemService { } } Intent intent = new Intent(Intent.ACTION_TIME_CHANGED); Intent intent = new Intent(Intent.ACTION_TIME_CHANGED); intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING | Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); | Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); getContext().sendBroadcastAsUser(intent, UserHandle.ALL); getContext().sendBroadcastAsUser(intent, UserHandle.ALL); // The world has changed on us, so we need to re-evaluate alarms // The world has changed on us, so we need to re-evaluate alarms Loading Loading
services/core/java/com/android/server/AlarmManagerService.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -2458,9 +2458,9 @@ class AlarmManagerService extends SystemService { expectedClockTime = lastTimeChangeClockTime expectedClockTime = lastTimeChangeClockTime + (nowELAPSED - mLastTimeChangeRealtime); + (nowELAPSED - mLastTimeChangeRealtime); } } if (lastTimeChangeClockTime == 0 || nowRTC < (expectedClockTime-500) if (lastTimeChangeClockTime == 0 || nowRTC < (expectedClockTime-1000) || nowRTC > (expectedClockTime+500)) { || nowRTC > (expectedClockTime+1000)) { // The change is by at least +/- 500 ms (or this is the first change), // The change is by at least +/- 1000 ms (or this is the first change), // let's do it! // let's do it! if (DEBUG_BATCH) { if (DEBUG_BATCH) { Slog.v(TAG, "Time changed notification from kernel; rebatching"); Slog.v(TAG, "Time changed notification from kernel; rebatching"); Loading @@ -2477,7 +2477,8 @@ class AlarmManagerService extends SystemService { } } Intent intent = new Intent(Intent.ACTION_TIME_CHANGED); Intent intent = new Intent(Intent.ACTION_TIME_CHANGED); intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING | Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); | Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); getContext().sendBroadcastAsUser(intent, UserHandle.ALL); getContext().sendBroadcastAsUser(intent, UserHandle.ALL); // The world has changed on us, so we need to re-evaluate alarms // The world has changed on us, so we need to re-evaluate alarms Loading