diff options
| author | 2020-11-06 00:22:27 +0000 | |
|---|---|---|
| committer | 2020-11-06 00:22:27 +0000 | |
| commit | 0f5b10f30ed7bbb554ef0446f678a983d6737887 (patch) | |
| tree | f066e627c130a141552449acddf3714306e5d0eb | |
| parent | b5eaea152ce599ecb9d8d0a8ad46d514653daf47 (diff) | |
| parent | 719a679de9cd426b80aa7f367af76e4eca6e053e (diff) | |
Merge changes from topic "12933477" into rvc-dev am: 6a6a15d595 am: 5fe0e5eda3 am: 719a679de9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12986657
Change-Id: I0249f2de810c72b1714d2e24135e4c73f458c2e4
| -rw-r--r-- | services/core/java/com/android/server/pm/permission/BasePermission.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/pm/permission/BasePermission.java b/services/core/java/com/android/server/pm/permission/BasePermission.java index 2d4b5012bf15..5e04171a3bca 100644 --- a/services/core/java/com/android/server/pm/permission/BasePermission.java +++ b/services/core/java/com/android/server/pm/permission/BasePermission.java @@ -367,7 +367,7 @@ public final class BasePermission { if (bp == null) { bp = new BasePermission(p.getName(), p.getPackageName(), TYPE_NORMAL); } - boolean wasNormal = bp.isNormal(); + boolean wasNonRuntime = !bp.isRuntime(); StringBuilder r = null; if (bp.perm == null) { if (bp.sourcePackageName == null @@ -411,7 +411,7 @@ public final class BasePermission { && Objects.equals(bp.perm.getName(), p.getName())) { bp.protectionLevel = p.getProtectionLevel(); } - 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 // permission, then permission state should be cleaned up bp.mPermissionDefinitionChanged = true; |