Merge "Do not review removed permissions"
This commit is contained in:
committed by
Android (Google) Code Review
commit
52fe5dd97f
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user