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

Commit 802ed607 authored by Mao Jinlong's avatar Mao Jinlong Committed by Linux Build Service Account
Browse files

AlarmManagerService : add mLock to avoid race conditions

Add lock to avoid race conditions when trying to access batches in
AlarmManagerService.

CRs-Fixed: 1038575
Change-Id: I4c214833aa8c893c2e11a9037ddbe07112223409
parent 6a4dfa59
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2648,6 +2648,7 @@ class AlarmManagerService extends SystemService {
                    }

                } else {
                    synchronized (mLock) {
                        // Just in case -- even though no wakeup flag was set, make sure
                        // we have updated the kernel to the next alarm time.
                        rescheduleKernelAlarmsLocked();
@@ -2655,6 +2656,7 @@ class AlarmManagerService extends SystemService {
                }
            }
        }
    }

    /**
     * Attribute blame for a WakeLock.