summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSelim Gurun <sgurun@google.com>2014-10-28 16:13:54 -0700
committerSelim Gurun <sgurun@google.com>2014-10-28 16:14:19 -0700
commit533a216feaa4866386fd15edcbc88ede1b4ffea7 (patch)
tree98f307e529a5e981f9a223184416c5c26fcb55a2 /src
parent3163112aeba3efdc65913f2ce980c46c394a6076 (diff)
downloadpackages_apps_Browser-533a216feaa4866386fd15edcbc88ede1b4ffea7.zip
packages_apps_Browser-533a216feaa4866386fd15edcbc88ede1b4ffea7.tar.gz
packages_apps_Browser-533a216feaa4866386fd15edcbc88ede1b4ffea7.tar.bz2
Added a check for an exception
Bug:18074899 Change-Id: I6f602f37a622f5a86f3e9a33021c018a3aa93cb6
Diffstat (limited to 'src')
-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 e21e3e8..207ada6 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