diff options
author | John Reck <jreck@google.com> | 2011-01-24 09:39:03 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-01-24 09:58:41 -0800 |
commit | 117f07d08e3e25e3c920a1dabe31dcd7643bacb2 (patch) | |
tree | 96c8905c54b3f2380e683f2a406f52bd0c060ed7 /src/com/android/browser/SuggestionsAdapter.java | |
parent | 87369eaa86190d500e80b5af663c3019249f77f3 (diff) | |
download | packages_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.java | 9 |
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(); + } } |