summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java20
1 files changed, 2 insertions, 18 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java
index af0ed284847d..506d69719e82 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java
@@ -40,7 +40,6 @@ public class FullscreenUserSwitcher {
private final int mShortAnimDuration;
private final StatusBar mStatusBar;
private final UserManagerHelper mUserManagerHelper;
- private int mCurrentForegroundUserId;
private boolean mShowing;
public FullscreenUserSwitcher(StatusBar statusBar, ViewStub containerStub, Context context) {
@@ -55,7 +54,6 @@ public class FullscreenUserSwitcher {
mUserGridView.setUserSelectionListener(this::onUserSelected);
mUserManagerHelper = new UserManagerHelper(context);
- updateCurrentForegroundUser();
mShortAnimDuration = mContainer.getResources()
.getInteger(android.R.integer.config_shortAnimTime);
@@ -78,22 +76,8 @@ public class FullscreenUserSwitcher {
}
public void onUserSwitched(int newUserId) {
- // The logic for foreground user change is needed here to exclude the reboot case. On
- // reboot, system fires ACTION_USER_SWITCHED change from -1 to 0 user. This is not an actual
- // user switch. We only want to trigger keyguard dismissal when foreground user changes.
- if (foregroundUserChanged()) {
- toggleSwitchInProgress(false);
- updateCurrentForegroundUser();
- mParent.post(this::dismissKeyguard);
- }
- }
-
- private boolean foregroundUserChanged() {
- return mCurrentForegroundUserId != mUserManagerHelper.getForegroundUserId();
- }
-
- private void updateCurrentForegroundUser() {
- mCurrentForegroundUserId = mUserManagerHelper.getForegroundUserId();
+ toggleSwitchInProgress(false);
+ mParent.post(this::dismissKeyguard);
}
private void onUserSelected(UserGridRecyclerView.UserRecord record) {