Merge "Revoke internal permissions upon definition change."
This commit is contained in:
committed by
Android (Google) Code Review
commit
f4513cdf37
@@ -431,6 +431,8 @@ public final class Permission {
|
||||
}
|
||||
}
|
||||
}
|
||||
boolean wasNonInternal = permission != null && permission.mType != TYPE_CONFIG
|
||||
&& !permission.isInternal();
|
||||
boolean wasNonRuntime = permission != null && permission.mType != TYPE_CONFIG
|
||||
&& !permission.isRuntime();
|
||||
if (permission == null) {
|
||||
@@ -476,10 +478,10 @@ public final class Permission {
|
||||
r.append("DUP:");
|
||||
r.append(permissionInfo.name);
|
||||
}
|
||||
if ((permission.isInternal() && ownerChanged)
|
||||
if ((permission.isInternal() && (ownerChanged || wasNonInternal))
|
||||
|| (permission.isRuntime() && (ownerChanged || wasNonRuntime))) {
|
||||
// If this is an internal/runtime permission and the owner has changed, or this wasn't a
|
||||
// runtime permission, then permission state should be cleaned up.
|
||||
// internal/runtime permission, then permission state should be cleaned up.
|
||||
permission.mDefinitionChanged = true;
|
||||
}
|
||||
if (PackageManagerService.DEBUG_PACKAGE_SCANNING && r != null) {
|
||||
|
||||
Reference in New Issue
Block a user