Fixes for changing the search engine.
Provide a default value for the Select search engine preference.
Move the Select search engine preference into advanced settings.
When opening the SearchDialog with a SearchEngine other than
Google, add a flag to hide the voice search icon.
Depends on a change to frameworks/base.
Change-Id: I6da2e582789253b3c5ffac9fe1ad3732f99f28ea
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 6f47788..5583466 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -1185,6 +1185,12 @@
if (appSearchData == null) {
appSearchData = createGoogleSearchSourceBundle(GOOGLE_SEARCH_SOURCE_TYPE);
}
+
+ SearchEngine searchEngine = mSettings.getSearchEngine();
+ if (searchEngine != null && !searchEngine.supportsVoiceSearch()) {
+ appSearchData.putBoolean(SearchManager.DISABLE_VOICE_SEARCH, true);
+ }
+
super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
}