Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23e6363b authored by Presubmit Automerger Backend's avatar Presubmit Automerger Backend
Browse files

[automerge] RESTRICT AUTOMERGE Validate permission tree size on permission update 2p: 1d86c8b2

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20029947

Bug: 242537498
Change-Id: Ie9f764994b11ad216071d328f5ed01260b8046f5
parents efbc8f2b 1d86c8b2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
            if (added) {
            enforcePermissionCapLocked(info, tree);
            if (added) {
                bp = new Permission(info.name, tree.getPackageName(), Permission.TYPE_DYNAMIC);
            } else if (!bp.isDynamic()) {
                throw new SecurityException("Not allowed to modify non-dynamic permission "