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:
TreeHugger Robot
2022-03-02 02:45:10 +00:00
committed by Automerger Merge Worker

View File

@@ -1176,14 +1176,14 @@ public final class PowerManagerService extends SystemService
@Override
public void onBootPhase(int phase) {
synchronized (mLock) {
if (phase == PHASE_SYSTEM_SERVICES_READY) {
systemReady();
if (phase == PHASE_SYSTEM_SERVICES_READY) {
systemReady();
} else if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
incrementBootCount();
} else if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
incrementBootCount();
} else if (phase == PHASE_BOOT_COMPLETED) {
} else if (phase == PHASE_BOOT_COMPLETED) {
synchronized (mLock) {
final long now = mClock.uptimeMillis();
mBootCompleted = true;
mDirty |= DIRTY_BOOT_COMPLETED;