Merge "RESTRICT AUTOMERGE Validate permission tree size on permission update" into rvc-dev

This commit is contained in:
Nate Myren
2022-10-25 17:54:24 +00:00
committed by Android (Google) Code Review

View File

@@ -610,8 +610,8 @@ public class PermissionManagerService extends IPermissionManager.Stub {
BasePermission bp = mSettings.getPermissionLocked(info.name);
added = bp == null;
int fixedLevel = PermissionInfo.fixProtectionLevel(info.protectionLevel);
enforcePermissionCapLocked(info, tree);
if (added) {
enforcePermissionCapLocked(info, tree);
bp = new BasePermission(info.name, tree.getSourcePackageName(),
BasePermission.TYPE_DYNAMIC);
} else if (!bp.isDynamic()) {