OSDN Git Service

Verify all possible hosts that match web nav
[android-x86/frameworks-base.git] / services / core / java / com / android / server / pm / PackageManagerService.java
index 36843d4..ed22b21 100644 (file)
@@ -17257,11 +17257,13 @@ public class PackageManagerService extends IPackageManager.Stub
             // and whether there are any web-nav filters that fit the profile for running
             // a verification pass now.
             if (needToVerify) {
+                final boolean needsVerification = needsNetworkVerificationLPr(packageName);
                 final int verificationId = mIntentFilterVerificationToken++;
                 for (ParsedActivity a : activities) {
                     for (ParsedIntentInfo filter : a.getIntents()) {
-                        if (filter.handlesWebUris(true)
-                                && needsNetworkVerificationLPr(a.getPackageName())) {
+                        // Run verification against hosts mentioned in any web-nav intent filter,
+                        // even if the filter matches non-web schemes as well
+                        if (needsVerification && filter.handlesWebUris(false)) {
                             if (DEBUG_DOMAIN_VERIFICATION) Slog.d(TAG,
                                     "Verification needed for IntentFilter:" + filter.toString());
                             mIntentFilterVerifier.addOneIntentFilterVerification(