summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/SuggestionsAdapter.java
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-07-28 17:48:58 -0700
committerJohn Reck <jreck@google.com>2011-07-28 18:04:53 -0700
commit5e8466f11f7acd78b83e0c388796d5ec0ab06c96 (patch)
tree70170a2baaf32e5a7e0bbd1e2ca5129ff4536fb1 /src/com/android/browser/SuggestionsAdapter.java
parent4e310c9873aa84ba4888327f88ac065d51874071 (diff)
downloadpackages_apps_browser-5e8466f11f7acd78b83e0c388796d5ec0ab06c96.zip
packages_apps_browser-5e8466f11f7acd78b83e0c388796d5ec0ab06c96.tar.gz
packages_apps_browser-5e8466f11f7acd78b83e0c388796d5ec0ab06c96.tar.bz2
Turbobox!
Bug: 5080207 Fix the omnibox's slow performance. It's now pretty snappy if I do say so myself Change-Id: I42d9ed87bcfa1a30f2413e0241afc254ae1e472d
Diffstat (limited to 'src/com/android/browser/SuggestionsAdapter.java')
-rw-r--r--src/com/android/browser/SuggestionsAdapter.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/com/android/browser/SuggestionsAdapter.java b/src/com/android/browser/SuggestionsAdapter.java
index 9a099cb..30b4738 100644
--- a/src/com/android/browser/SuggestionsAdapter.java
+++ b/src/com/android/browser/SuggestionsAdapter.java
@@ -17,6 +17,7 @@
package com.android.browser;
import com.android.browser.provider.BrowserProvider2;
+import com.android.browser.provider.BrowserProvider2.OmniboxSuggestions;
import com.android.browser.search.SearchEngine;
import android.app.SearchManager;
@@ -53,9 +54,12 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable,
public static final int TYPE_SUGGEST = 4;
public static final int TYPE_VOICE_SEARCH = 5;
- private static final String[] COMBINED_PROJECTION =
- {BrowserContract.Combined._ID, BrowserContract.Combined.TITLE,
- BrowserContract.Combined.URL, BrowserContract.Combined.IS_BOOKMARK};
+ private static final String[] COMBINED_PROJECTION = {
+ OmniboxSuggestions._ID,
+ OmniboxSuggestions.TITLE,
+ OmniboxSuggestions.URL,
+ OmniboxSuggestions.IS_BOOKMARK
+ };
private static final String COMBINED_SELECTION =
"(url LIKE ? OR url LIKE ? OR url LIKE ? OR url LIKE ? OR title LIKE ?)";
@@ -470,18 +474,14 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable,
args[4] = like;
selection = COMBINED_SELECTION;
}
- Uri.Builder ub = BrowserContract.Combined.CONTENT_URI.buildUpon();
+ Uri.Builder ub = OmniboxSuggestions.CONTENT_URI.buildUpon();
ub.appendQueryParameter(BrowserContract.PARAM_LIMIT,
Integer.toString(Math.max(mLinesLandscape, mLinesPortrait)));
ub.appendQueryParameter(BrowserProvider2.PARAM_GROUP_BY,
- BrowserContract.Combined.URL);
+ OmniboxSuggestions.URL);
mCursor =
mContext.getContentResolver().query(ub.build(), COMBINED_PROJECTION,
- selection,
- (constraint != null) ? args : null,
- BrowserContract.Combined.IS_BOOKMARK + " DESC, " +
- BrowserContract.Combined.VISITS + " DESC, " +
- BrowserContract.Combined.DATE_LAST_VISITED + " DESC");
+ selection, (constraint != null) ? args : null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}