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

Commit 7c8f6edc authored by Christopher Tate's avatar Christopher Tate Committed by The Android Automerger
Browse files

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

Bug 10056484

Change-Id: I527f592b0bb91bfbfff1d52c3327fe9e2ac53471
parent 7d9f8be8
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(