Merge "Combine the checks for DO/PO in isAdminAffectedByRestriction()." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5bbe99a299
@@ -12574,9 +12574,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|
|||||||
case UserManager.RESTRICTION_NOT_SET:
|
case UserManager.RESTRICTION_NOT_SET:
|
||||||
return false;
|
return false;
|
||||||
case UserManager.RESTRICTION_SOURCE_DEVICE_OWNER:
|
case UserManager.RESTRICTION_SOURCE_DEVICE_OWNER:
|
||||||
return !isDeviceOwner(admin, userId);
|
|
||||||
case UserManager.RESTRICTION_SOURCE_PROFILE_OWNER:
|
case UserManager.RESTRICTION_SOURCE_PROFILE_OWNER:
|
||||||
return !isProfileOwner(admin, userId);
|
return !(isDeviceOwner(admin, userId) || isProfileOwner(admin, userId));
|
||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user