Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 563914a9 authored by Sungmin Choi's avatar Sungmin Choi
Browse files

TIME_TICK was not occurred for one hour

TIME_TICK was not occurred at the end of DST for one hour

Step to reproduce:
1. Settings -> Date & time
2. uncheck Automatic date & time and Automatic time zone
3. select Time zone -> select Brussels
4. set date -> Oct. 28. 2012
5. set time -> 1:59 AM

Bug: 7922117
Change-Id: I2e78bd97b508d6a38471425cfbaca45fb4b89c1e
parent 9fae2ecc
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -816,16 +816,12 @@ class AlarmManagerService extends IAlarmManager.Stub {
        }
        
        public void scheduleTimeTickEvent() {
            Calendar calendar = Calendar.getInstance();
            final long currentTime = System.currentTimeMillis();
            calendar.setTimeInMillis(currentTime);
            calendar.add(Calendar.MINUTE, 1);
            calendar.set(Calendar.SECOND, 0);
            calendar.set(Calendar.MILLISECOND, 0);
            final long nextTime = 60000 * ((currentTime / 60000) + 1);

            // Schedule this event for the amount of time that it would take to get to
            // the top of the next minute.
            final long tickEventDelay = calendar.getTimeInMillis() - currentTime;
            final long tickEventDelay = nextTime - currentTime;

            set(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime() + tickEventDelay,
                    mTimeTickSender);