summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2011-03-04 18:57:30 +0000
committerNarayan Kamath <narayan@google.com>2011-03-04 18:57:30 +0000
commit41feb052be24e43a1203cfbe24328d1b019875e8 (patch)
tree9e946e6ec29c79d6e6625c1656a00369fbd84817
parent00a227596d5a1d5b68943fda80f3680b72601005 (diff)
downloadpackages_apps_Browser-41feb052be24e43a1203cfbe24328d1b019875e8.zip
packages_apps_Browser-41feb052be24e43a1203cfbe24328d1b019875e8.tar.gz
packages_apps_Browser-41feb052be24e43a1203cfbe24328d1b019875e8.tar.bz2
Guard against mSearchBox being null.
Unlikely to be seen in practice, but discovered by monkey. Bug: 3510741 Change-Id: I64d9b5aca66e7c7023632dfd31a22764ecac8dd0
-rw-r--r--src/com/android/browser/InstantSearchEngine.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/browser/InstantSearchEngine.java b/src/com/android/browser/InstantSearchEngine.java
index 128997c..b4ccfa5 100644
--- a/src/com/android/browser/InstantSearchEngine.java
+++ b/src/com/android/browser/InstantSearchEngine.java
@@ -81,7 +81,7 @@ public class InstantSearchEngine implements SearchEngine, DropdownChangeListener
// If for some reason we are in a bad state, ensure that the
// user gets default search results at the very least.
- if (mSearchBox == null & !isInstantPage()) {
+ if (mSearchBox == null || !isInstantPage()) {
mWrapped.startSearch(context, query, appData, extraData);
return;
}
@@ -238,6 +238,10 @@ public class InstantSearchEngine implements SearchEngine, DropdownChangeListener
mController.registerDropdownChangeListener(this);
+ if (mSearchBox == null) {
+ return mWrapped.getSuggestions(context, query);
+ }
+
mSearchBox.setDimensions(0, 0, 0, mHeight);
mSearchBox.onresize();