Use the correct userId when checking if disabled by admin.
And when adding accounts if only one account type is possible and it is disabled by admin, show the admin support dialog. Bug: 26897250 Bug: 26767564 Change-Id: I5cca64491a100efc34307c45aa35c14412f043cd
This commit is contained in:
@@ -272,7 +272,7 @@ public class AccountSyncSettings extends AccountPreferenceBase {
|
||||
mUserHandle.getIdentifier());
|
||||
if (admin == null) {
|
||||
admin = RestrictedLockUtils.checkIfAccountManagementDisabled(
|
||||
getPrefContext(), mAccount.type);
|
||||
getPrefContext(), mAccount.type, mUserHandle.getIdentifier());
|
||||
}
|
||||
RestrictedLockUtils.setMenuItemAsDisabledByAdmin(getPrefContext(),
|
||||
removeAccount, admin);
|
||||
|
Reference in New Issue
Block a user