Add handling of admin enforced restrictions in Users Settings
Before, when the restrictions were applied, the preferences that were restricted were hidden. After this change, if admin applies a restriction, the preference is displayed as disabled and Policy Transparency Dialog is displayed Bug: 338226475 Test: atest UserSettingsTest && atest UserDetailsSettingsTest Flag: android.multiuser.new_multiuser_settings_ux Change-Id: I1b5aeeeec7accde278ff3e46ea3d64c91d8400db
This commit is contained in:
@@ -57,11 +57,6 @@ public class MultiUserSwitchBarController implements SwitchWidgetController.OnSw
|
||||
mSwitchBar.setDisabledByAdmin(RestrictedLockUtilsInternal
|
||||
.checkIfRestrictionEnforced(mContext, UserManager.DISALLOW_USER_SWITCH,
|
||||
UserHandle.myUserId()));
|
||||
|
||||
} else if (mUserCapabilities.mDisallowAddUser) {
|
||||
mSwitchBar.setDisabledByAdmin(RestrictedLockUtilsInternal
|
||||
.checkIfRestrictionEnforced(mContext, UserManager.DISALLOW_ADD_USER,
|
||||
UserHandle.myUserId()));
|
||||
} else {
|
||||
mSwitchBar.setEnabled(mUserCapabilities.mIsMain);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user