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

Commit 20f170d6 authored by Christopher Tate's avatar Christopher Tate
Browse files

Don't try to do the work if there isn't any data.

Bug 10056484

Change-Id: I527f592b0bb91bfbfff1d52c3327fe9e2ac53471
parent 99ae1c9f
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -640,6 +640,7 @@ class AlarmManagerService extends IAlarmManager.Stub {
    private void rescheduleKernelAlarmsLocked() {
        // Schedule the next upcoming wakeup alarm.  If there is a deliverable batch
        // prior to that which contains no wakeups, we schedule that as well.
        if (mAlarmBatches.size() > 0) {
            final Batch firstWakeup = findFirstWakeupBatchLocked();
            final Batch firstBatch = mAlarmBatches.get(0);
            if (firstWakeup != null && mNextWakeup != firstWakeup.start) {
@@ -651,6 +652,7 @@ class AlarmManagerService extends IAlarmManager.Stub {
                setLocked(ELAPSED_REALTIME, firstBatch.start);
            }
        }
    }

    public void setTime(long millis) {
        mContext.enforceCallingOrSelfPermission(