Index: shared/src/main/java/org/chromium/customtabsclient/shared/CustomTabsHelper.java |
diff --git a/shared/src/main/java/org/chromium/customtabsclient/shared/CustomTabsHelper.java b/shared/src/main/java/org/chromium/customtabsclient/shared/CustomTabsHelper.java |
index 00af1e2189019aeabbcfcc4d498e22d09a2a073c..361127886a1678ef6ffca834c138ffe681965555 100644 |
--- a/shared/src/main/java/org/chromium/customtabsclient/shared/CustomTabsHelper.java |
+++ b/shared/src/main/java/org/chromium/customtabsclient/shared/CustomTabsHelper.java |
@@ -20,6 +20,7 @@ import android.content.IntentFilter; |
import android.content.pm.PackageManager; |
import android.content.pm.ResolveInfo; |
import android.net.Uri; |
+import android.support.customtabs.CustomTabsClient; |
import android.text.TextUtils; |
import android.util.Log; |
@@ -66,7 +67,7 @@ public class CustomTabsHelper { |
PackageManager pm = context.getPackageManager(); |
// Get default VIEW intent handler. |
Intent activityIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.example.com")); |
- ResolveInfo defaultViewHandlerInfo = pm.resolveActivity(activityIntent, 0); |
+ ResolveInfo defaultViewHandlerInfo = CustomTabsClient.getDefaultHandlerForIntent(pm, activityIntent); |
String defaultViewHandlerPackageName = null; |
if (defaultViewHandlerInfo != null) { |
defaultViewHandlerPackageName = defaultViewHandlerInfo.activityInfo.packageName; |