Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +10 −4 Original line number Diff line number Diff line Loading @@ -11337,7 +11337,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_APPLICATION_RESTRICTIONS) .setAdmin(caller.getPackageName()) .setBoolean(/* isDelegate */ who == null) .setBoolean(/* isDelegate */ isCallerDelegate(caller)) .setStrings(packageName) .write(); } Loading Loading @@ -13378,7 +13378,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_APPLICATION_HIDDEN) .setAdmin(caller.getPackageName()) .setBoolean(/* isDelegate */ who == null) .setBoolean(/* isDelegate */ isCallerDelegate(caller)) .setStrings(packageName, hidden ? "hidden" : "not_hidden", parent ? CALLED_FROM_PARENT : NOT_CALLED_FROM_PARENT) .write(); Loading Loading @@ -13730,7 +13730,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_UNINSTALL_BLOCKED) .setAdmin(caller.getPackageName()) .setBoolean(/* isDelegate */ who == null) .setBoolean(/* isDelegate */ isCallerDelegate(caller)) .setStrings(packageName) .write(); } Loading Loading @@ -16280,7 +16280,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { .setAdmin(caller.getPackageName()) .setStrings(permission) .setInt(grantState) .setBoolean(/* isDelegate */ admin == null) .setBoolean( /* isDelegate */ isCallerDelegate(caller)) .write(); callback.sendResult(Bundle.EMPTY); Loading Loading @@ -22183,6 +22184,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { private static final HashMap<String, String> DELEGATE_SCOPES = new HashMap<>(); { DELEGATE_SCOPES.put(MANAGE_DEVICE_POLICY_RUNTIME_PERMISSIONS, DELEGATION_PERMISSION_GRANT); DELEGATE_SCOPES.put(MANAGE_DEVICE_POLICY_APP_RESTRICTIONS, DELEGATION_APP_RESTRICTIONS); DELEGATE_SCOPES.put(MANAGE_DEVICE_POLICY_APPS_CONTROL, DELEGATION_BLOCK_UNINSTALL); DELEGATE_SCOPES.put(MANAGE_DEVICE_POLICY_SECURITY_LOGGING, DELEGATION_SECURITY_LOGGING); DELEGATE_SCOPES.put(MANAGE_DEVICE_POLICY_PACKAGE_STATE, DELEGATION_PACKAGE_ACCESS); } private static final HashMap<String, String> CROSS_USER_PERMISSIONS = Loading Loading @@ -22371,6 +22376,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { + permission + ", " + CROSS_USER_PERMISSIONS.get(permission) + "(if calling cross-user)" + "}"); } } Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +10 −4 Original line number Diff line number Diff line Loading @@ -11337,7 +11337,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_APPLICATION_RESTRICTIONS) .setAdmin(caller.getPackageName()) .setBoolean(/* isDelegate */ who == null) .setBoolean(/* isDelegate */ isCallerDelegate(caller)) .setStrings(packageName) .write(); } Loading Loading @@ -13378,7 +13378,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_APPLICATION_HIDDEN) .setAdmin(caller.getPackageName()) .setBoolean(/* isDelegate */ who == null) .setBoolean(/* isDelegate */ isCallerDelegate(caller)) .setStrings(packageName, hidden ? "hidden" : "not_hidden", parent ? CALLED_FROM_PARENT : NOT_CALLED_FROM_PARENT) .write(); Loading Loading @@ -13730,7 +13730,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_UNINSTALL_BLOCKED) .setAdmin(caller.getPackageName()) .setBoolean(/* isDelegate */ who == null) .setBoolean(/* isDelegate */ isCallerDelegate(caller)) .setStrings(packageName) .write(); } Loading Loading @@ -16280,7 +16280,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { .setAdmin(caller.getPackageName()) .setStrings(permission) .setInt(grantState) .setBoolean(/* isDelegate */ admin == null) .setBoolean( /* isDelegate */ isCallerDelegate(caller)) .write(); callback.sendResult(Bundle.EMPTY); Loading Loading @@ -22183,6 +22184,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { private static final HashMap<String, String> DELEGATE_SCOPES = new HashMap<>(); { DELEGATE_SCOPES.put(MANAGE_DEVICE_POLICY_RUNTIME_PERMISSIONS, DELEGATION_PERMISSION_GRANT); DELEGATE_SCOPES.put(MANAGE_DEVICE_POLICY_APP_RESTRICTIONS, DELEGATION_APP_RESTRICTIONS); DELEGATE_SCOPES.put(MANAGE_DEVICE_POLICY_APPS_CONTROL, DELEGATION_BLOCK_UNINSTALL); DELEGATE_SCOPES.put(MANAGE_DEVICE_POLICY_SECURITY_LOGGING, DELEGATION_SECURITY_LOGGING); DELEGATE_SCOPES.put(MANAGE_DEVICE_POLICY_PACKAGE_STATE, DELEGATION_PACKAGE_ACCESS); } private static final HashMap<String, String> CROSS_USER_PERMISSIONS = Loading Loading @@ -22371,6 +22376,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { + permission + ", " + CROSS_USER_PERMISSIONS.get(permission) + "(if calling cross-user)" + "}"); } }