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

Commit 91a15e8a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix potential race condition problem"

parents c0d6224b 8c1a8684
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();