summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/browser')
-rw-r--r--src/com/android/browser/UrlHandler.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/browser/UrlHandler.java b/src/com/android/browser/UrlHandler.java
index edafebd..084a479 100644
--- a/src/com/android/browser/UrlHandler.java
+++ b/src/com/android/browser/UrlHandler.java
@@ -138,7 +138,13 @@ public class UrlHandler {
// check whether the intent can be resolved. If not, we will see
// whether we can download it from the Market.
- if (mActivity.getPackageManager().resolveActivity(intent, 0) == null) {
+ ResolveInfo r = null;
+ try {
+ r = mActivity.getPackageManager().resolveActivity(intent, 0);
+ } catch (Exception e) {
+ return false;
+ }
+ if (r == null) {
String packagename = intent.getPackage();
if (packagename != null) {
intent = new Intent(Intent.ACTION_VIEW, Uri