summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/search/SearchEngines.java
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2011-02-23 15:49:17 +0000
committerNarayan Kamath <narayan@google.com>2011-03-02 22:45:45 +0000
commit5119edd5744cfc6d3a8ed480a8853586c737bed4 (patch)
treeaa9f3f6382c047a010742324aa307b20b4f7270e /src/com/android/browser/search/SearchEngines.java
parent80aad8d851601d39f73214c198111ca49e25f654 (diff)
downloadpackages_apps_browser-5119edd5744cfc6d3a8ed480a8853586c737bed4.zip
packages_apps_browser-5119edd5744cfc6d3a8ed480a8853586c737bed4.tar.gz
packages_apps_browser-5119edd5744cfc6d3a8ed480a8853586c737bed4.tar.bz2
Implement the psychic search engine.
(a) Add a new subclass of SearchEngine that receives suggestions provided by psychic and displays them in the suggestions dropdown. (b) Add a Labs setting that can turn this feature on or off. Change-Id: Icae05b6b55f489278028e5af560d9b36014a0f59
Diffstat (limited to 'src/com/android/browser/search/SearchEngines.java')
-rw-r--r--src/com/android/browser/search/SearchEngines.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/com/android/browser/search/SearchEngines.java b/src/com/android/browser/search/SearchEngines.java
index a6ba3de..a159f17 100644
--- a/src/com/android/browser/search/SearchEngines.java
+++ b/src/com/android/browser/search/SearchEngines.java
@@ -15,13 +15,11 @@
*/
package com.android.browser.search;
+import com.android.browser.BrowserSettings;
+import com.android.browser.InstantSearchEngine;
import com.android.browser.R;
-import android.app.SearchManager;
-import android.content.ComponentName;
import android.content.Context;
-import android.content.pm.ActivityInfo;
-import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.text.TextUtils;
import android.util.Log;
@@ -34,6 +32,10 @@ public class SearchEngines {
private static final String TAG = "SearchEngines";
public static SearchEngine getDefaultSearchEngine(Context context) {
+ if (BrowserSettings.getInstance().useInstant()) {
+ return new InstantSearchEngine(context, DefaultSearchEngine.create(context));
+ }
+
return DefaultSearchEngine.create(context);
}