Revert "Disable multiuser toggle om COPE device and add explanat..."

Revert submission 25262217-fix_mu_for_cope

Reason for revert: This issue requires a different approach to the solution.

Reverted changes: /q/submissionid:25262217-fix_mu_for_cope

Change-Id: Ic6e8afd76cb0af88612cf5a6cd34a0c7f50759c4
This commit is contained in:
Tetiana Meronyk
2023-12-14 15:38:02 +00:00
committed by Android (Google) Code Review
parent 80ae4b3c41
commit 1a81a9e942

View File

@@ -57,10 +57,11 @@ public class MultiUserSwitchBarController implements SwitchWidgetController.OnSw
mSwitchBar.setDisabledByAdmin(RestrictedLockUtilsInternal
.checkIfRestrictionEnforced(mContext, UserManager.DISALLOW_USER_SWITCH,
UserHandle.myUserId()));
} else if (mUserCapabilities.mDisallowAddUser) {
onSwitchToggled(false);
mSwitchBar.setDisabledByAdmin(RestrictedLockUtilsInternal
.checkIfAddUserDisallowed(mContext, UserHandle.myUserId()));
.checkIfRestrictionEnforced(mContext, UserManager.DISALLOW_ADD_USER,
UserHandle.myUserId()));
} else {
mSwitchBar.setEnabled(!mUserCapabilities.mDisallowSwitchUser
&& !mUserCapabilities.mIsGuest && mUserCapabilities.isAdmin());