summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-28 02:34:22 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-28 02:34:22 +0000
commit91aa126ead46ce9af994a07c8f165ba6cb1f1bc0 (patch)
tree2f8399a420b756bc939053356a4962f132610987
parent1e10fb67a9057f4085f0e1c1cdc517b2448aa8e0 (diff)
parentf37ddd70296a85b7f88cd56910515de31c9c66ab (diff)
downloadSettings-91aa126ead46ce9af994a07c8f165ba6cb1f1bc0.tar.gz
Merge cherrypicks of ['googleplex-android-review.googlesource.com/25642236'] into 24Q1-release.
Change-Id: I37c1ed6d566efe3104b342f22a5ff52c9e459efc
-rw-r--r--src/com/android/settings/users/MultiUserSwitchBarController.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/settings/users/MultiUserSwitchBarController.java b/src/com/android/settings/users/MultiUserSwitchBarController.java
index 238e86ec9dc..33651c31fc4 100644
--- a/src/com/android/settings/users/MultiUserSwitchBarController.java
+++ b/src/com/android/settings/users/MultiUserSwitchBarController.java
@@ -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());