Bugfix: adds extra null check

Bug: 16976436
Change-Id: Id51fd3125b4e68ff7c0ec37ec031fcb8ff882ed4
This commit is contained in:
Alexandra Gherghina
2014-08-12 18:20:47 +01:00
parent 14690b0aa3
commit 7c97bbc39f

View File

@@ -3195,7 +3195,7 @@ public class PackageManagerService extends IPackageManager.Stub {
if (fromSource != null) {
packageNames = fromSource.get(targetUserId);
}
if (packageNames.contains(intent.getPackage())) {
if (packageNames != null && packageNames.contains(intent.getPackage())) {
return true;
}
// We need the package name, so we try to resolve with the loosest flags possible