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

Commit 264707ca authored by Kenny Guy's avatar Kenny Guy
Browse files

Fix bug with starting users in background.

It shouldn't tell the window manager to lock or freeze the
screen when starting a user in the background.

Change-Id: I24c6c19a20c360ecbed7d28e1d7249c025a463b9
parent 21045126
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