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

Commit 8874f5c8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Relax checks on dynamic permissions."

parents 876a3b04 4dc50527
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -417,8 +417,8 @@ public class PermissionManagerService {
                bp = new BasePermission(info.name, tree.getSourcePackageName(),
                        BasePermission.TYPE_DYNAMIC);
            } else if (bp.isDynamic()) {
                throw new SecurityException(
                        "Not allowed to modify non-dynamic permission "
                // TODO: switch this back to SecurityException
                Slog.wtf(TAG, "Not allowed to modify non-dynamic permission "
                        + info.name);
            }
            changed = bp.addToTree(fixedLevel, info, tree);
@@ -444,8 +444,8 @@ public class PermissionManagerService {
                return;
            }
            if (bp.isDynamic()) {
                throw new SecurityException(
                        "Not allowed to modify non-dynamic permission "
                // TODO: switch this back to SecurityException
                Slog.wtf(TAG, "Not allowed to modify non-dynamic permission "
                        + permName);
            }
            mSettings.removePermissionLocked(permName);