Merge "Remove double-locking from PowerManagerService.onBootPhase" into tm-dev am: 1d609047f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17047524 Change-Id: I1e0c6eecdc095bc611fd7674d9f77fe6dffa5d58
This commit is contained in:
@@ -1176,14 +1176,14 @@ public final class PowerManagerService extends SystemService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBootPhase(int phase) {
|
public void onBootPhase(int phase) {
|
||||||
synchronized (mLock) {
|
if (phase == PHASE_SYSTEM_SERVICES_READY) {
|
||||||
if (phase == PHASE_SYSTEM_SERVICES_READY) {
|
systemReady();
|
||||||
systemReady();
|
|
||||||
|
|
||||||
} else if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
|
} else if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
|
||||||
incrementBootCount();
|
incrementBootCount();
|
||||||
|
|
||||||
} else if (phase == PHASE_BOOT_COMPLETED) {
|
} else if (phase == PHASE_BOOT_COMPLETED) {
|
||||||
|
synchronized (mLock) {
|
||||||
final long now = mClock.uptimeMillis();
|
final long now = mClock.uptimeMillis();
|
||||||
mBootCompleted = true;
|
mBootCompleted = true;
|
||||||
mDirty |= DIRTY_BOOT_COMPLETED;
|
mDirty |= DIRTY_BOOT_COMPLETED;
|
||||||
|
|||||||
Reference in New Issue
Block a user