Omnibox supports search extra data
Bug: 3025590
Fix the omnibox to support passing on SearchManager.EXTRA_SEARCH_DATA
in searches done from the suggestion adapter.
Change-Id: Ica6462ef27722c3bbcc0508178ce431e87e27e86
diff --git a/src/com/android/browser/TitleBarXLarge.java b/src/com/android/browser/TitleBarXLarge.java
index b87ea78..f39c769 100644
--- a/src/com/android/browser/TitleBarXLarge.java
+++ b/src/com/android/browser/TitleBarXLarge.java
@@ -137,7 +137,7 @@
stopOrRefresh();
} else if (mGoButton == v) {
if (!TextUtils.isEmpty(mUrlFocused.getText())) {
- onAction(mUrlFocused.getText().toString());
+ onAction(mUrlFocused.getText().toString(), null);
}
} else if (mClearButton == v) {
mUrlFocused.setText("");
@@ -154,12 +154,15 @@
// UrlInputListener implementation
@Override
- public void onAction(String text) {
+ public void onAction(String text, String extra) {
mBrowserActivity.getTabControl().getCurrentTopWebView().requestFocus();
mBrowserActivity.hideFakeTitleBar();
Intent i = new Intent();
i.setAction(Intent.ACTION_SEARCH);
i.putExtra(SearchManager.QUERY, text);
+ if (extra != null) {
+ i.putExtra(SearchManager.EXTRA_DATA_KEY, extra);
+ }
mBrowserActivity.onNewIntent(i);
setUrlMode(false);
setDisplayTitle(text);