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

Commit 1e5e9923 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix potential race condition problem" am: 91a15e8a

parents 27946cfb 91a15e8a
Loading
Loading
Loading
Loading
+9 −11
Original line number Diff line number Diff line
@@ -4212,8 +4212,8 @@ public final class PowerManagerService extends SystemService
    }

    private boolean forceSuspendInternal(int uid) {
        try {
        synchronized (mLock) {
            try {
                mForceSuspendActive = true;
                // Place the system in an non-interactive state
                for (int idx = 0; idx < mPowerGroups.size(); idx++) {
@@ -4223,7 +4223,6 @@ public final class PowerManagerService extends SystemService

                // Disable all the partial wake locks as well
                updateWakeLockDisabledStatesLocked();
            }

                Slog.i(TAG, "Force-Suspending (uid " + uid + ")...");
                boolean success = mNativeWrapper.nativeForceSuspend();
@@ -4232,7 +4231,6 @@ public final class PowerManagerService extends SystemService
                }
                return success;
            } finally {
            synchronized (mLock) {
                mForceSuspendActive = false;
                // Re-enable wake locks once again.
                updateWakeLockDisabledStatesLocked();