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.
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 @@
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);