Merge "Validate permission tree size on permission update"
This commit is contained in:
@@ -649,8 +649,8 @@ public class PermissionManagerServiceImpl implements PermissionManagerServiceInt
|
||||
Permission bp = mRegistry.getPermission(info.name);
|
||||
added = bp == null;
|
||||
int fixedLevel = PermissionInfo.fixProtectionLevel(info.protectionLevel);
|
||||
enforcePermissionCapLocked(info, tree);
|
||||
if (added) {
|
||||
enforcePermissionCapLocked(info, tree);
|
||||
bp = new Permission(info.name, tree.getPackageName(), Permission.TYPE_DYNAMIC);
|
||||
} else if (!bp.isDynamic()) {
|
||||
throw new SecurityException("Not allowed to modify non-dynamic permission "
|
||||
|
||||
Reference in New Issue
Block a user