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

Commit e17bbad5 authored by Kenny Guy's avatar Kenny Guy Committed by Android (Google) Code Review
Browse files

Merge "Fix bug with starting users in background."

parents 4b131046 264707ca
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -16119,8 +16119,10 @@ public final class ActivityManagerService extends ActivityManagerNative
                    return false;
                }
                if (foreground) {
                    mWindowManager.startFreezingScreen(R.anim.screen_user_exit,
                            R.anim.screen_user_enter);
                }
                boolean needStart = false;
@@ -16139,16 +16141,15 @@ public final class ActivityManagerService extends ActivityManagerNative
                if (foreground) {
                    mCurrentUserId = userId;
                    mWindowManager.setCurrentUser(userId);
                    // Once the internal notion of the active user has switched, we lock the device
                    // with the option to show the user switcher on the keyguard.
                    mWindowManager.lockNow(null);
                } else {
                    final Integer currentUserIdInt = Integer.valueOf(mCurrentUserId);
                    mUserLru.remove(currentUserIdInt);
                    mUserLru.add(currentUserIdInt);
                }
                // Once the internal notion of the active user has switched, we lock the device
                // with the option to show the user switcher on the keyguard.
                mWindowManager.lockNow(null);
                final UserStartedState uss = mStartedUsers.get(userId);
                // Make sure user is in the started state.  If it is currently