summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/SuggestionsAdapter.java
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-01-24 09:39:03 -0800
committerJohn Reck <jreck@google.com>2011-01-24 09:58:41 -0800
commit117f07d08e3e25e3c920a1dabe31dcd7643bacb2 (patch)
tree96c8905c54b3f2380e683f2a406f52bd0c060ed7 /src/com/android/browser/SuggestionsAdapter.java
parent87369eaa86190d500e80b5af663c3019249f77f3 (diff)
downloadpackages_apps_Browser-117f07d08e3e25e3c920a1dabe31dcd7643bacb2.zip
packages_apps_Browser-117f07d08e3e25e3c920a1dabe31dcd7643bacb2.tar.gz
packages_apps_Browser-117f07d08e3e25e3c920a1dabe31dcd7643bacb2.tar.bz2
Disable SearchSuggestions in incognito mode
Bug: 3336558 Change-Id: Ie88eddee0f4931a206ba45cec708cdbb69cce008
Diffstat (limited to 'src/com/android/browser/SuggestionsAdapter.java')
-rw-r--r--src/com/android/browser/SuggestionsAdapter.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/browser/SuggestionsAdapter.java b/src/com/android/browser/SuggestionsAdapter.java
index c2e203a..3c1a689 100644
--- a/src/com/android/browser/SuggestionsAdapter.java
+++ b/src/com/android/browser/SuggestionsAdapter.java
@@ -70,6 +70,7 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable,
Object mResultsLock = new Object();
List<String> mVoiceResults;
boolean mReverseResults;
+ boolean mIncognitoMode;
interface CompletionListener {
@@ -279,7 +280,9 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable,
}
void startSuggestionsAsync(final CharSequence constraint) {
- new SlowFilterTask().execute(constraint);
+ if (!mIncognitoMode) {
+ new SlowFilterTask().execute(constraint);
+ }
}
@Override
@@ -564,4 +567,8 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable,
mSuggestResults = null;
}
+ public void setIncognitoMode(boolean incognito) {
+ mIncognitoMode = incognito;
+ clearCache();
+ }
}