summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Falk <mattias.falk@sonyericsson.com>2010-08-26 13:14:40 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-26 13:14:40 -0700
commit784b02bfb63c0390c630c4eabd3db9276e2561b6 (patch)
tree577e88742c5d27604dc08883e2b38f6ecc8b0e5d
parent71daa6cebfb529c45920e7ef5ca583d8a2bf454d (diff)
parent399c6b8ec5b4fda71bbf67edd7e9dcb7fb5b8f00 (diff)
downloadpackages_apps_Browser-784b02bfb63c0390c630c4eabd3db9276e2561b6.zip
packages_apps_Browser-784b02bfb63c0390c630c4eabd3db9276e2561b6.tar.gz
packages_apps_Browser-784b02bfb63c0390c630c4eabd3db9276e2561b6.tar.bz2
am 399c6b8e: am 552751ea: Avoid crash in browser in systems with no search provider
Merge commit '399c6b8ec5b4fda71bbf67edd7e9dcb7fb5b8f00' * commit '399c6b8ec5b4fda71bbf67edd7e9dcb7fb5b8f00': Avoid crash in browser in systems with no search provider
-rw-r--r--src/com/android/browser/BrowserActivity.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index fcc1a8d..5a1cf55 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -606,7 +606,13 @@ public class BrowserActivity extends Activity
intent.putExtra(SearchManager.EXTRA_DATA_KEY, extraData);
}
intent.putExtra(Browser.EXTRA_APPLICATION_ID, getPackageName());
- startActivity(intent);
+
+ // can't be sure there is an activity for the Intent
+ try {
+ startActivity(intent);
+ } catch (ActivityNotFoundException ex) {
+ return false;
+ }
return true;
}