commit | 798bf9a36333e9b476693459ec7839cdc2749a84 | [log] [tgz] |
---|---|---|
author | Philip P. Moltmann <moltmann@google.com> | Thu Nov 08 17:07:19 2018 -0800 |
committer | Philip P. Moltmann <moltmann@google.com> | Thu Nov 08 17:07:19 2018 -0800 |
tree | e378fa13d39f0c4d8041b67ae542833871973fbd | |
parent | 12d0ee09bbd580369d597df0739650ebce046ff7 [diff] [blame] |
Check if bp.perm is null before resolving it Test: Built Change-Id: I757a28cb6d403267914f5c63f9b4e2cf0cdb079e
diff --git a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java index 5fa667a..b788935 100644 --- a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java +++ b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
@@ -2122,7 +2122,8 @@ // Only system declares background permissions, hence mapping does never change. mBackgroundPermissions = new ArrayMap<>(); for (BasePermission bp : mSettings.getAllPermissionsLocked()) { - if (bp.perm.info != null && bp.perm.info.backgroundPermission != null) { + if (bp.perm != null && bp.perm.info != null + && bp.perm.info.backgroundPermission != null) { String fgPerm = bp.name; String bgPerm = bp.perm.info.backgroundPermission;