Loading services/core/java/com/android/server/AlarmManagerService.java +7 −1 Original line number Diff line number Diff line Loading @@ -2015,6 +2015,7 @@ class AlarmManagerService extends SystemService { public ClockReceiver() { IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_TIME_TICK); filter.addAction(Intent.ACTION_TIME_CHANGED); filter.addAction(Intent.ACTION_DATE_CHANGED); getContext().registerReceiver(this, filter); } Loading @@ -2026,6 +2027,11 @@ class AlarmManagerService extends SystemService { Slog.v(TAG, "Received TIME_TICK alarm; rescheduling"); } scheduleTimeTickEvent(); } else if (intent.getAction().equals(Intent.ACTION_TIME_CHANGED)) { if (DEBUG_BATCH) { Slog.v(TAG, "Received TIME_CHANGED alarm; reschedule date changed event."); } scheduleDateChangedEvent(); } else if (intent.getAction().equals(Intent.ACTION_DATE_CHANGED)) { // Since the kernel does not keep track of DST, we need to // reset the TZ information at the beginning of each day Loading Loading @@ -2054,7 +2060,7 @@ class AlarmManagerService extends SystemService { public void scheduleDateChangedEvent() { Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(System.currentTimeMillis()); calendar.set(Calendar.HOUR, 0); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); Loading Loading
services/core/java/com/android/server/AlarmManagerService.java +7 −1 Original line number Diff line number Diff line Loading @@ -2015,6 +2015,7 @@ class AlarmManagerService extends SystemService { public ClockReceiver() { IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_TIME_TICK); filter.addAction(Intent.ACTION_TIME_CHANGED); filter.addAction(Intent.ACTION_DATE_CHANGED); getContext().registerReceiver(this, filter); } Loading @@ -2026,6 +2027,11 @@ class AlarmManagerService extends SystemService { Slog.v(TAG, "Received TIME_TICK alarm; rescheduling"); } scheduleTimeTickEvent(); } else if (intent.getAction().equals(Intent.ACTION_TIME_CHANGED)) { if (DEBUG_BATCH) { Slog.v(TAG, "Received TIME_CHANGED alarm; reschedule date changed event."); } scheduleDateChangedEvent(); } else if (intent.getAction().equals(Intent.ACTION_DATE_CHANGED)) { // Since the kernel does not keep track of DST, we need to // reset the TZ information at the beginning of each day Loading Loading @@ -2054,7 +2060,7 @@ class AlarmManagerService extends SystemService { public void scheduleDateChangedEvent() { Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(System.currentTimeMillis()); calendar.set(Calendar.HOUR, 0); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); Loading