Merge "Remove double-locking from PowerManagerService.onBootPhase" into tm-dev

This commit is contained in:
TreeHugger Robot
2022-03-02 02:26:09 +00:00
committed by Android (Google) Code Review

View File

@@ -1176,7 +1176,6 @@ 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();
@@ -1184,6 +1183,7 @@ public final class PowerManagerService extends SystemService
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;