Unify multiuser switcher enabled setting
This does the following: 1. The multiuser switcher (in Settings and SysUI) is now disabled by default. In order for it to be enabled one of the following must be true: a. the user has explicitly toggled it on in Settings b. a new user gets created (via any means) c. config_showUserSwitcherByDefault overrides this default 2. Even if a new user is added, if the user had explicitly *disabled* the switcher, the switcher still won't be enabled. 3. SystemUI and Settings (et al.) all use UserManager.isUserSwitcherEnabled as the source of truth in this regard. No one else reads USER_SWITCHER_ENABLED directly. 4. If the switcher is enabled, then SystemUI will show the switcher avatar, even if there are no other users on the device, as long as new users can be created. This way, if the user has enabled the switcher, the user can use the avatar to add guest/secondary users (which would not be possible if enabled status was tied solely to the existence of other users). Bug: 137943217 Bug: 141372193 Bug: 149973281 Bug: 130270878 Test: manual: Settings > Multiuser doesn't turn on the systemui avatar Test: manual: Settings > Multiuser is initially disabled Test: manual: adb shell pm create-user A, does turn on sysui avatar even if the user didn't enable, but not if they disabled Change-Id: Ia440b4db78792da76f94322a563d93db0c68e933
Loading
Please register or sign in to comment