commit | d8308070ab2cadabb68da6f391612c50a395c3ea | [log] [tgz] |
---|---|---|
author | Svet Ganov <svetoslavganov@google.com> | Sat Mar 24 00:04:38 2018 -0700 |
committer | Svet Ganov <svetoslavganov@google.com> | Sat Mar 24 00:04:43 2018 -0700 |
tree | d87ad256e0798a8340ad789e9d2b53435adac28e | |
parent | c7f6eadffc0a243618ce09ee8d6bb8235738135d [diff] [blame] |
Add missing null check Test: manual Bug: 72442137 Change-Id: Id0dc9b7f624a9ee0061fc735ed0a2f2aefd8a954
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 afa9dd0..ee02f65 100644 --- a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java +++ b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
@@ -1503,6 +1503,9 @@ return EmptyArray.INT; } for (PackageParser.Package pkg : pkgList) { + if (pkg.requestedPermissions == null) { + continue; + } final int requestedPermCount = pkg.requestedPermissions.size(); for (int j = 0; j < requestedPermCount; j++) { String permission = pkg.requestedPermissions.get(j);