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

Commit 492b6863 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add back missing synchronized in stopGuestOrEphemeralUserIfBackground"

parents 34524151 fbc77178
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -795,12 +795,14 @@ class UserController implements Handler.Callback {
     */
    private void stopGuestOrEphemeralUserIfBackground(int oldUserId) {
        if (DEBUG_MU) Slog.i(TAG, "Stop guest or ephemeral user if background: " + oldUserId);
        synchronized(mLock) {
            UserState oldUss = mStartedUsers.get(oldUserId);
            if (oldUserId == UserHandle.USER_SYSTEM || oldUserId == mCurrentUserId || oldUss == null
                    || oldUss.state == UserState.STATE_STOPPING
                    || oldUss.state == UserState.STATE_SHUTDOWN) {
                return;
            }
        }

        UserInfo userInfo = getUserInfo(oldUserId);
        if (userInfo.isEphemeral()) {