Clear omnibox when pressing search key.
Fix for http://b/issue?id=2442426
No longer override onSearchRequested, so that pressing the search
key behaves normally. For touching the title bar, use the old
onSearchRequested (renamed to editUrl).
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 22ac914..0688e36 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -1348,18 +1348,16 @@
return bundle;
}
- /**
- * Overriding this to insert a local information bundle
- */
- @Override
- public boolean onSearchRequested() {
+ /* package */ void editUrl() {
if (mOptionsMenuOpen) closeOptionsMenu();
String url = (getTopWindow() == null) ? null : getTopWindow().getUrl();
startSearch(mSettings.getHomePage().equals(url) ? null : url, true,
- createGoogleSearchSourceBundle(GOOGLE_SEARCH_SOURCE_SEARCHKEY), false);
- return true;
+ null, false);
}
+ /**
+ * Overriding this to insert a local information bundle
+ */
@Override
public void startSearch(String initialQuery, boolean selectInitialQuery,
Bundle appSearchData, boolean globalSearch) {
@@ -1469,7 +1467,7 @@
break;
case R.id.goto_menu_id:
- onSearchRequested();
+ editUrl();
break;
case R.id.bookmarks_menu_id: