From cb9c5d30a96a0f8ed4e27cdb38a28bfbebf93892 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Tue, 9 Apr 2019 14:00:06 -0400 Subject: [PATCH] Fixes default setting for showing MultiUserSwitch By default, UserManager enables UserSwitch if no decission has been made before. However, in QS, we want the UserSwitcher not to show unless the user has explicitly enabled UserSwitch Fixes: 129898837 Test: manual, after Full wipe Change-Id: Ib2a0c10dff910199ce5c60d9e578efee3899cbb9 --- .../com/android/systemui/statusbar/phone/MultiUserSwitch.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserSwitch.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserSwitch.java index 1d87a8b439e84..443cc4397bd35 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserSwitch.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserSwitch.java @@ -98,8 +98,10 @@ public class MultiUserSwitch extends FrameLayout implements View.OnClickListener // Short-circuiting from UserManager. Needs to be extracted because of SystemUI boolean flag // qs_show_user_switcher_for_single_user + // The default in UserManager is to show the switcher. We want to not show it unless the + // user explicitly requests it in Settings final boolean userSwitcherEnabled = Settings.Global.getInt(mContext.getContentResolver(), - Settings.Global.USER_SWITCHER_ENABLED, 1) != 0; + Settings.Global.USER_SWITCHER_ENABLED, 0) != 0; if (!UserManager.supportsMultipleUsers() || mUserManager.hasUserRestriction(UserManager.DISALLOW_USER_SWITCH)