diff options
| author | Mike LeBeau <mlebeau@android.com> | 2009-06-23 17:36:59 -0700 |
|---|---|---|
| committer | Mike LeBeau <mlebeau@android.com> | 2009-06-23 17:36:59 -0700 |
| commit | 2af730520477a41106eef3a8480bb57fda5b03b2 (patch) | |
| tree | 6219933938e2939cdbceabd67064c85c57f844c5 /src/com/android | |
| parent | 2595f146fecd3828231c6611362cce65acd9afb6 (diff) | |
| download | packages_apps_Browser-2af730520477a41106eef3a8480bb57fda5b03b2.tar.gz packages_apps_Browser-2af730520477a41106eef3a8480bb57fda5b03b2.tar.bz2 packages_apps_Browser-2af730520477a41106eef3a8480bb57fda5b03b2.zip | |
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/android')
| -rw-r--r-- | src/com/android/browser/BrowserProvider.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserProvider.java b/src/com/android/browser/BrowserProvider.java index 9b723644d..474719001 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); |
