diff options
author | John Reck <jreck@google.com> | 2010-11-10 11:57:04 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2010-11-10 11:57:04 -0800 |
commit | 40f720ecfd4ef7ebb657f0fc1906a9982b3bafbd (patch) | |
tree | 5064294545b26fa7ee046e45fe45626616bc75d1 /src/com/android/browser/UrlInputView.java | |
parent | e222fe87a6a582b283cbad0f6967e908c4bfe85e (diff) | |
download | packages_apps_browser-40f720ecfd4ef7ebb657f0fc1906a9982b3bafbd.zip packages_apps_browser-40f720ecfd4ef7ebb657f0fc1906a9982b3bafbd.tar.gz packages_apps_browser-40f720ecfd4ef7ebb657f0fc1906a9982b3bafbd.tar.bz2 |
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
Diffstat (limited to 'src/com/android/browser/UrlInputView.java')
-rw-r--r-- | src/com/android/browser/UrlInputView.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/com/android/browser/UrlInputView.java b/src/com/android/browser/UrlInputView.java index 18c5fe6..e7fc233 100644 --- a/src/com/android/browser/UrlInputView.java +++ b/src/com/android/browser/UrlInputView.java @@ -114,7 +114,7 @@ public class UrlInputView extends AutoCompleteTextView @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { - finishInput(getText().toString()); + finishInput(getText().toString(), null); return true; } @@ -123,7 +123,7 @@ public class UrlInputView extends AutoCompleteTextView if (hasFocus) { forceIme(); } else { - finishInput(null); + finishInput(null, null); } if (mWrappedFocusListener != null) { mWrappedFocusListener.onFocusChange(v, hasFocus); @@ -138,14 +138,14 @@ public class UrlInputView extends AutoCompleteTextView mInputManager.showSoftInput(this, 0); } - private void finishInput(String url) { + private void finishInput(String url, String extra) { this.dismissDropDown(); this.setSelection(0,0); mInputManager.hideSoftInputFromWindow(getWindowToken(), 0); if (url == null) { mListener.onDismiss(); } else { - mListener.onAction(url); + mListener.onAction(url, extra); } } @@ -157,15 +157,15 @@ public class UrlInputView extends AutoCompleteTextView } @Override - public void onSelect(String url) { - finishInput(url); + public void onSelect(String url, String extra) { + finishInput(url, extra); } @Override public boolean onKeyPreIme(int keyCode, KeyEvent evt) { if (keyCode == KeyEvent.KEYCODE_BACK) { // catch back key in order to do slightly more cleanup than usual - finishInput(null); + finishInput(null, null); return true; } return super.onKeyPreIme(keyCode, evt); @@ -175,7 +175,7 @@ public class UrlInputView extends AutoCompleteTextView public void onDismiss(); - public void onAction(String text); + public void onAction(String text, String extra); public void onEdit(String text); |