Revoke permission on non-runtime -> runtime upgrade
Not only on normal -> runtime. Test: atest PermissionEscalationTest Bug: 154505240, 168319670 Change-Id: If3b420067b4d7111dcf67ae6f98e42176158b679
This commit is contained in:
@@ -425,7 +425,7 @@ public final class Permission {
|
||||
permission = new Permission(permissionInfo.name, permissionInfo.packageName,
|
||||
TYPE_MANIFEST);
|
||||
}
|
||||
boolean wasNormal = permission.isNormal();
|
||||
boolean wasNonRuntime = !permission.isRuntime();
|
||||
StringBuilder r = null;
|
||||
if (!permission.mReconciled) {
|
||||
if (permission.mPermissionInfo.packageName == null
|
||||
@@ -465,8 +465,8 @@ public final class Permission {
|
||||
r.append("DUP:");
|
||||
r.append(permissionInfo.name);
|
||||
}
|
||||
if (permission.isRuntime() && (ownerChanged || wasNormal)) {
|
||||
// If this is a runtime permission and the owner has changed, or this was a normal
|
||||
if (permission.isRuntime() && (ownerChanged || wasNonRuntime)) {
|
||||
// If this is a runtime permission and the owner has changed, or this wasn't a runtime
|
||||
// permission, then permission state should be cleaned up
|
||||
permission.mDefinitionChanged = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user