Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +8 −2 Original line number Diff line number Diff line Loading @@ -4373,7 +4373,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { final int adminUser = admin.getUserHandle().getIdentifier(); // Password complexity is only taken into account from DO/PO if (isDeviceOwner(adminComponent, adminUser) || isProfileOwner(adminComponent, adminUser)) { || isProfileOwnerUncheckedLocked(adminComponent, adminUser)) { maxRequiredComplexity = Math.max(maxRequiredComplexity, admin.mPasswordComplexity); } } Loading Loading @@ -6216,7 +6216,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { } Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId"); final CallerIdentity caller = getAdminCallerIdentity(comp); final CallerIdentity caller = getCallerIdentity(); Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle)); Preconditions.checkCallAuthorization(hasCallingOrSelfPermission(BIND_DEVICE_ADMIN)); Loading Loading @@ -7487,6 +7487,12 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { return who != null && who.equals(profileOwner); } private boolean isProfileOwnerUncheckedLocked(ComponentName who, int userId) { ensureLocked(); final ComponentName profileOwner = mOwners.getProfileOwnerComponent(userId); return who != null && who.equals(profileOwner); } /** * Returns {@code true} if the provided caller identity is of a profile owner. * @param caller identity of caller. Loading Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +8 −2 Original line number Diff line number Diff line Loading @@ -4373,7 +4373,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { final int adminUser = admin.getUserHandle().getIdentifier(); // Password complexity is only taken into account from DO/PO if (isDeviceOwner(adminComponent, adminUser) || isProfileOwner(adminComponent, adminUser)) { || isProfileOwnerUncheckedLocked(adminComponent, adminUser)) { maxRequiredComplexity = Math.max(maxRequiredComplexity, admin.mPasswordComplexity); } } Loading Loading @@ -6216,7 +6216,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { } Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId"); final CallerIdentity caller = getAdminCallerIdentity(comp); final CallerIdentity caller = getCallerIdentity(); Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle)); Preconditions.checkCallAuthorization(hasCallingOrSelfPermission(BIND_DEVICE_ADMIN)); Loading Loading @@ -7487,6 +7487,12 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { return who != null && who.equals(profileOwner); } private boolean isProfileOwnerUncheckedLocked(ComponentName who, int userId) { ensureLocked(); final ComponentName profileOwner = mOwners.getProfileOwnerComponent(userId); return who != null && who.equals(profileOwner); } /** * Returns {@code true} if the provided caller identity is of a profile owner. * @param caller identity of caller. Loading