Index: chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java |
index 61df77168c025271076ac1411a4b781a66d637ae..bcb7081cbf87efb6a95def5af52bceed5011691c 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java |
@@ -8,6 +8,7 @@ import android.content.ActivityNotFoundException; |
import android.content.ComponentName; |
import android.content.Intent; |
import android.net.Uri; |
+import android.os.StrictMode; |
import android.provider.Browser; |
import android.text.TextUtils; |
import android.webkit.WebView; |
@@ -250,9 +251,18 @@ public class ExternalNavigationHandler { |
return OverrideUrlLoadingResult.NO_OVERRIDE; |
} |
+ boolean canResolveActivity = false; |
+ // Temporarily allowing disk access while fixing. TODO: http://crbug.com/527415 |
+ StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); |
+ try { |
+ canResolveActivity = mDelegate.canResolveActivity(intent); |
+ } finally { |
+ StrictMode.setThreadPolicy(oldPolicy); |
+ } |
+ |
// check whether the intent can be resolved. If not, we will see |
// whether we can download it from the Market. |
- if (!mDelegate.canResolveActivity(intent)) { |
+ if (!canResolveActivity) { |
if (hasBrowserFallbackUrl) { |
return clobberCurrentTabWithFallbackUrl(browserFallbackUrl, params); |
} |