diff options
| author | 2018-08-07 18:28:58 -0700 | |
|---|---|---|
| committer | 2018-08-08 14:50:50 -0700 | |
| commit | f01ea6c6663ad57f1a2633c3581ea89c53d824da (patch) | |
| tree | 3d7c3191b2193bfec2b4e2819a62b0bc74d3909f | |
| parent | 1ff73729b81f88788900206d5d47a6ff9b7b1761 (diff) | |
Gets rid of the conditional keyguard dismissal in full screen user switcher.
This logic existed to differentiate between boot and switch, at the time
when we wanted to show the switcher on user boot. That's not the case any more,
so the logic has become obsolete.
This also resolve the issue with keyguard not being dimissed in the bug below.
Bug: 112142114
Test: multiple boot/switches on mojave
Change-Id: I82b55bd3d00e5ab7249347d19d804b8945c3c9fc
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java | 20 |
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) { |