Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +8 −6 Original line number Original line Diff line number Diff line Loading @@ -8703,15 +8703,17 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { enforceSystemUserOrPermission(permission); enforceSystemUserOrPermission(permission); } } private void enforceManagedProfile(int userHandle, String message) { private void enforceManagedProfile(int userId, String message) { if(!isManagedProfile(userHandle)) { if (!isManagedProfile(userId)) { throw new SecurityException("You can not " + message + " outside a managed profile."); throw new SecurityException(String.format( "You can not %s outside a managed profile, userId = %d", message, userId)); } } } } private void enforceNotManagedProfile(int userHandle, String message) { private void enforceNotManagedProfile(int userId, String message) { if(isManagedProfile(userHandle)) { if (isManagedProfile(userId)) { throw new SecurityException("You can not " + message + " for a managed profile."); throw new SecurityException(String.format( "You can not %s for a managed profile, userId = %d", message, userId)); } } } } Loading Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +8 −6 Original line number Original line Diff line number Diff line Loading @@ -8703,15 +8703,17 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { enforceSystemUserOrPermission(permission); enforceSystemUserOrPermission(permission); } } private void enforceManagedProfile(int userHandle, String message) { private void enforceManagedProfile(int userId, String message) { if(!isManagedProfile(userHandle)) { if (!isManagedProfile(userId)) { throw new SecurityException("You can not " + message + " outside a managed profile."); throw new SecurityException(String.format( "You can not %s outside a managed profile, userId = %d", message, userId)); } } } } private void enforceNotManagedProfile(int userHandle, String message) { private void enforceNotManagedProfile(int userId, String message) { if(isManagedProfile(userHandle)) { if (isManagedProfile(userId)) { throw new SecurityException("You can not " + message + " for a managed profile."); throw new SecurityException(String.format( "You can not %s for a managed profile, userId = %d", message, userId)); } } } } Loading