From aaa7aef9845f0012ed6724db6ec718aca2ace10a Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Wed, 10 Apr 2019 15:22:20 -0400 Subject: [PATCH] Creates user_switcher_enabled setting to match setting When the user enters UserSettings, the switch displays the setting as on, but the setting is not created until the user modifies this for the first time. This change makes sure that the setting is created when the user enters UserSettings for the first time. Fixes: 130270878 Test: manual, switch to second user and observe switcher icons. Change-Id: I30bc5025c178da3668a76c828c34545c1d98b085 (cherry picked from commit a52961d80352fd20edcbb5308c13a7167096c4ac) --- .../android/settings/users/MultiUserSwitchBarController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/android/settings/users/MultiUserSwitchBarController.java b/src/com/android/settings/users/MultiUserSwitchBarController.java index 58de14963fa..a5fdf9b3279 100644 --- a/src/com/android/settings/users/MultiUserSwitchBarController.java +++ b/src/com/android/settings/users/MultiUserSwitchBarController.java @@ -52,6 +52,8 @@ public class MultiUserSwitchBarController implements SwitchWidgetController.OnSw mListener = listener; mUserCapabilities = UserCapabilities.create(context); mSwitchBar.setChecked(mUserCapabilities.mUserSwitcherEnabled); + Settings.Global.putInt(mContext.getContentResolver(), + Settings.Global.USER_SWITCHER_ENABLED, mSwitchBar.isChecked() ? 1 : 0); if (mUserCapabilities.mDisallowSwitchUser) { mSwitchBar.setDisabledByAdmin(RestrictedLockUtilsInternal