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

Commit c1826ef1 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: I9c1ffc3bdba6e40ba32be04ada50ffc82892a62c
parents 120d0e7a 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)) {