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