Don't walk mutexed collections outside the mutex

In particular, don't call rescheduleKernelAlarmsLocked() without
the lock held, or Bad Things will happen.

Bug 29931253

Change-Id: I93a7f16d543b5af2adff27f949a68f3d54169285
This commit is contained in:
Christopher Tate
2016-07-07 14:41:36 -07:00
parent 07e234c9d7
commit 7b5b7cb63b

View File

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