RESTRICT AUTOMERGE Validate permission tree size on permission update
Bug: 242537498 Test: manual Change-Id: I15343e84c1802d6b89249106263319a6539fa73b
This commit is contained in:
@@ -657,8 +657,8 @@ public class PermissionManagerService extends IPermissionManager.Stub {
|
||||
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