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

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

Merge "Check if UserState is null in stopGuestOrEphemeralUserIfBackground"

parents fca64263 62995efe
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -796,7 +796,7 @@ class UserController implements Handler.Callback {
    private void stopGuestOrEphemeralUserIfBackground(int oldUserId) {
    private void stopGuestOrEphemeralUserIfBackground(int oldUserId) {
        if (DEBUG_MU) Slog.i(TAG, "Stop guest or ephemeral user if background: " + oldUserId);
        if (DEBUG_MU) Slog.i(TAG, "Stop guest or ephemeral user if background: " + oldUserId);
        UserState oldUss = mStartedUsers.get(oldUserId);
        UserState oldUss = mStartedUsers.get(oldUserId);
        if (oldUserId == UserHandle.USER_SYSTEM || oldUserId == mCurrentUserId
        if (oldUserId == UserHandle.USER_SYSTEM || oldUserId == mCurrentUserId || oldUss == null
                || oldUss.state == UserState.STATE_STOPPING
                || oldUss.state == UserState.STATE_STOPPING
                || oldUss.state == UserState.STATE_SHUTDOWN) {
                || oldUss.state == UserState.STATE_SHUTDOWN) {
            return;
            return;