summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMike LeBeau <mlebeau@android.com>2009-06-23 17:36:59 -0700
committerMike LeBeau <mlebeau@android.com>2009-06-23 17:36:59 -0700
commit2af730520477a41106eef3a8480bb57fda5b03b2 (patch)
tree6219933938e2939cdbceabd67064c85c57f844c5 /src/com
parent2595f146fecd3828231c6611362cce65acd9afb6 (diff)
downloadpackages_apps_Browser-2af730520477a41106eef3a8480bb57fda5b03b2.zip
packages_apps_Browser-2af730520477a41106eef3a8480bb57fda5b03b2.tar.gz
packages_apps_Browser-2af730520477a41106eef3a8480bb57fda5b03b2.tar.bz2
Return the url of a browser history item in the intent query column of the
suggestion. This is so that global search can rewrite a query in the search dialog (i.e., fill in the search box with the url of the suggestion when the user rolls over to select the suggestion). Browser uses android:searchMode="rewriteQueryFromData" to accomplish this but global search does the default thing of using the intent query column, if present, as a rewrite for the current query.
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/browser/BrowserProvider.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserProvider.java b/src/com/android/browser/BrowserProvider.java
index 9b72364..4747190 100644
--- a/src/com/android/browser/BrowserProvider.java
+++ b/src/com/android/browser/BrowserProvider.java
@@ -489,7 +489,11 @@ public class BrowserProvider extends ContentProvider {
case SUGGEST_COLUMN_QUERY_ID:
if (mHistoryCount > mPos) {
- return null;
+ // Return the url in the intent query column. This is ignored
+ // within the browser because our searchable is set to
+ // android:searchMode="queryRewriteFromData", but it is used by
+ // global search for query rewriting.
+ return mHistoryCursor.getString(1);
} else if (!mBeyondCursor) {
if (mSuggestQueryId == -1) return null;
return mSuggestCursor.getString(mSuggestQueryId);