OSDN Git Service

Fix NPE when walking the set of packages to update app link policy
authorChristopher Tate <ctate@google.com>
Wed, 24 Jun 2015 19:18:05 +0000 (12:18 -0700)
committerChristopher Tate <ctate@google.com>
Wed, 24 Jun 2015 19:21:14 +0000 (12:21 -0700)
Bug 21851441

Change-Id: I3616c5a7e40f5ff9ad9bbfee579a4a2fb2b1f7fd

services/core/java/com/android/server/pm/Settings.java

index 169f6de..dcd7799 100644 (file)
@@ -1072,7 +1072,9 @@ final class Settings {
         ArraySet<String> currentDomains = current.getIntentFilterVerificationInfo().getDomains();
         if (status == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS) {
             for (PackageSetting ps : mPackages.values()) {
-                if (ps == null || ps.pkg.packageName.equals(packageName)) continue;
+                if (ps == null || ps.pkg == null || packageName.equals(ps.pkg.packageName)) {
+                    continue;
+                }
                 IntentFilterVerificationInfo ivi = ps.getIntentFilterVerificationInfo();
                 if (ivi == null) {
                     continue;