diff options
| author | John Reck <jreck@google.com> | 2011-02-11 15:16:01 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-02-11 15:16:01 -0800 |
| commit | bb5826510a84a5b5014decf34a94e81fdaf895cb (patch) | |
| tree | f3cb3f0386a9e44d5502019580cf7eef6ee5f5bb /src/com | |
| parent | 1218ce769ff70be5f0f114beba4eebde894beb1d (diff) | |
| parent | db3d43dfe0235c61e6ed12413fba86d8225cb04f (diff) | |
| download | packages_apps_Browser-bb5826510a84a5b5014decf34a94e81fdaf895cb.tar.gz packages_apps_Browser-bb5826510a84a5b5014decf34a94e81fdaf895cb.tar.bz2 packages_apps_Browser-bb5826510a84a5b5014decf34a94e81fdaf895cb.zip | |
Merge "Handle unsupported schema case better"
Diffstat (limited to 'src/com')
| -rw-r--r-- | src/com/android/browser/UrlHandler.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/browser/UrlHandler.java b/src/com/android/browser/UrlHandler.java index 686ed7b90..03bab9bcd 100644 --- a/src/com/android/browser/UrlHandler.java +++ b/src/com/android/browser/UrlHandler.java @@ -20,7 +20,6 @@ import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.Intent; import android.content.IntentFilter; -import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.database.Cursor; @@ -31,6 +30,7 @@ import android.webkit.WebView; import java.net.URISyntaxException; import java.util.List; +import java.util.regex.Matcher; /** * @@ -156,7 +156,11 @@ public class UrlHandler { // security (only access to BROWSABLE activities). intent.addCategory(Intent.CATEGORY_BROWSABLE); intent.setComponent(null); - if (!isSpecializedHandlerAvailable(intent)) { + // Make sure webkit can handle it internally before checking for specialized + // handlers. If webkit can't handle it internally, we need to call + // startActivityIfNeeded + Matcher m = UrlUtils.ACCEPTED_URI_SCHEMA.matcher(url); + if (m.matches() && !isSpecializedHandlerAvailable(intent)) { return false; } try { |
