Merge "Add a missing null check" into oc-dev

This commit is contained in:
Jeff Sharkey
2017-07-29 15:56:14 +00:00
committed by Android (Google) Code Review

View File

@@ -4004,6 +4004,9 @@ public class PackageManagerService extends IPackageManager.Stub
// 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) {