Revert "Disable multiuser toggle when more than 1 user is created"

Revert submission 24420426-multi_toggle

Reason for revert: This change needs to be done along with some other UI changes to avoid confusion

Reverted changes: /q/submissionid:24420426-multi_toggle

Change-Id: Ife2e03d0090fefcb4c1fa53dd007336759eb1bc7
This commit is contained in:
Tetiana Meronyk
2023-09-07 15:50:09 +00:00
committed by Android (Google) Code Review
parent 7968047fc5
commit 8489ae99dc
3 changed files with 6 additions and 38 deletions

View File

@@ -290,9 +290,8 @@ public class UserSettings extends SettingsPreferenceFragment
} else {
switchBar.hide();
}
boolean isToggleEnabled = mUserManager.getFullUserCount() == 1;
mSwitchBarController = new MultiUserSwitchBarController(activity,
new MainSwitchBarController(switchBar), isToggleEnabled, this /* listener */);
new MainSwitchBarController(switchBar), this /* listener */);
getSettingsLifecycle().addObserver(mSwitchBarController);
boolean openUserEditDialog = getIntent().getBooleanExtra(
EXTRA_OPEN_DIALOG_USER_PROFILE_EDITOR, false);
@@ -423,9 +422,6 @@ public class UserSettings extends SettingsPreferenceFragment
mRemoveGuestOnExitPreferenceController.getPreferenceKey()));
if (mShouldUpdateUserList) {
updateUI();
// Update state of "Allow multiple users" toggle when list of users updates
boolean isToggleEnabled = mUserManager.getFullUserCount() == 1;
mSwitchBarController.setToggleEnabled(isToggleEnabled);
}
}