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

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

Merge "Do not review removed permissions"

parents be5eb176 c6bdbec4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -18310,6 +18310,10 @@ public class PackageManagerService extends IPackageManager.Stub
                continue;
            }
            if (bp.isRemoved()) {
                continue;
            }
            // If shared user we just reset the state to which only this app contributed.
            if (ps.sharedUser != null) {
                boolean used = false;
+5 −0
Original line number Diff line number Diff line
@@ -189,6 +189,11 @@ public final class BasePermission {
        return (protectionLevel & PermissionInfo.PROTECTION_MASK_BASE)
                == PermissionInfo.PROTECTION_DANGEROUS;
    }

    public boolean isRemoved() {
        return perm.info != null && (perm.info.flags & PermissionInfo.FLAG_REMOVED) != 0;
    }

    public boolean isSignature() {
        return (protectionLevel & PermissionInfo.PROTECTION_MASK_BASE) ==
                PermissionInfo.PROTECTION_SIGNATURE;
+4 −0
Original line number Diff line number Diff line
@@ -799,6 +799,10 @@ public class PermissionManagerService {
                    continue;
                }

                if (bp.isRemoved()) {
                    continue;
                }

                // Limit ephemeral apps to ephemeral allowed permissions.
                if (pkg.applicationInfo.isInstantApp() && !bp.isInstant()) {
                    if (DEBUG_PERMISSIONS) {