Merge changes from topic "12933388" into qt-dev am: ebf67ea3b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12986651 Change-Id: I1893ed21bd88dbb1a29133c829fcb63f1485a326
This commit is contained in:
@@ -365,7 +365,7 @@ public final class BasePermission {
|
|||||||
if (bp == null) {
|
if (bp == null) {
|
||||||
bp = new BasePermission(p.info.name, p.info.packageName, TYPE_NORMAL);
|
bp = new BasePermission(p.info.name, p.info.packageName, TYPE_NORMAL);
|
||||||
}
|
}
|
||||||
boolean wasNormal = bp.isNormal();
|
boolean wasNonRuntime = !bp.isRuntime();
|
||||||
StringBuilder r = null;
|
StringBuilder r = null;
|
||||||
if (bp.perm == null) {
|
if (bp.perm == null) {
|
||||||
if (bp.sourcePackageName == null
|
if (bp.sourcePackageName == null
|
||||||
@@ -409,7 +409,7 @@ public final class BasePermission {
|
|||||||
if (bp.perm == p) {
|
if (bp.perm == p) {
|
||||||
bp.protectionLevel = p.info.protectionLevel;
|
bp.protectionLevel = p.info.protectionLevel;
|
||||||
}
|
}
|
||||||
if (bp.isRuntime() && (ownerChanged || wasNormal)) {
|
if (bp.isRuntime() && (ownerChanged || wasNonRuntime)) {
|
||||||
// If this is a runtime permission and the owner has changed, or this was a normal
|
// If this is a runtime permission and the owner has changed, or this was a normal
|
||||||
// permission, then permission state should be cleaned up
|
// permission, then permission state should be cleaned up
|
||||||
bp.mPermissionDefinitionChanged = true;
|
bp.mPermissionDefinitionChanged = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user