Merge "Clear no_remove_managed_profile retriction when removing test PO" into rvc-dev am: 9747684a07 am: 8ab1a41a5f
Change-Id: If8985a4f78020a22dd15959594a7b8bcaffa883e
This commit is contained in:
@@ -4434,6 +4434,11 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
||||
clearDeviceOwnerLocked(getDeviceOwnerAdminLocked(), userHandle);
|
||||
}
|
||||
if (isProfileOwner(adminReceiver, userHandle)) {
|
||||
if (isProfileOwnerOfOrganizationOwnedDevice(userHandle)) {
|
||||
mUserManager.setUserRestriction(UserManager.DISALLOW_REMOVE_MANAGED_PROFILE,
|
||||
false,
|
||||
UserHandle.of(getProfileParentId(userHandle)));
|
||||
}
|
||||
final ActiveAdmin admin = getActiveAdminUncheckedLocked(adminReceiver,
|
||||
userHandle, /* parent */ false);
|
||||
clearProfileOwnerLocked(admin, userHandle);
|
||||
|
||||
Reference in New Issue
Block a user