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

Commit cc52272b authored by Christopher Tate's avatar Christopher Tate Committed by Android Git Automerger
Browse files

am a3e79199: Merge "TIME_TICK was not occurred for one hour"

* commit 'a3e79199':
  TIME_TICK was not occurred for one hour
parents c02bbfb3 a3e79199
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -956,16 +956,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);