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

Commit 3142a08e authored by Jackal Guo's avatar Jackal Guo Committed by Automerger Merge Worker
Browse files

[RESTRICT AUTOMERGE] Fix the inconsistency of protection level am: b5efdf72

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

Change-Id: I5f62762f2fb31797b59849bf299b33e438b756af
parents 97ef77e4 b5efdf72
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -409,6 +409,8 @@ public final class BasePermission {
        }
        if (bp.perm != null && Objects.equals(bp.perm.getPackageName(), p.getPackageName())
                && Objects.equals(bp.perm.getName(), p.getName())) {
            bp.perm.setFlags(bp.perm.getFlags() & ~PermissionInfo.FLAG_INSTALLED);
            bp.perm = p.setFlags(p.getFlags() | PermissionInfo.FLAG_INSTALLED);
            bp.protectionLevel = p.getProtectionLevel();
        }
        if (bp.isRuntime() && (ownerChanged || wasNonRuntime)) {