Merge "Do not review removed permissions"

This commit is contained in:
TreeHugger Robot
2018-12-10 22:58:34 +00:00
committed by Android (Google) Code Review
3 changed files with 13 additions and 0 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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) {