commit | 0ae9570c9925603a04d5a78775a68cc9d437542b | [log] [tgz] |
---|---|---|
author | Svet Ganov <svetoslavganov@google.com> | Fri Jul 28 15:35:06 2017 -0700 |
committer | Svetoslav Ganov <svetoslavganov@google.com> | Fri Jul 28 22:41:45 2017 +0000 |
tree | 519c03908ea919f929677dfc76bbe3f3f4ba0429 | |
parent | 39cc33f192d528f250818446ea0418aaf0cfe41f [diff] |
Add a missing null check Test: manual bug::62755026 Change-Id: Icf719d0e62986febd4d31f22be3e59d83c8e6e09
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index ddb5832..f36b762 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -4004,6 +4004,9 @@ // reader synchronized (mPackages) { final BasePermission p = mSettings.mPermissions.get(name); + if (p == null) { + return null; + } // If the caller is an app that targets pre 26 SDK drop protection flags. final PermissionInfo permissionInfo = generatePermissionInfo(p, flags); if (permissionInfo != null) {