diff options
author | Leon Scroggins III <scroggo@google.com> | 2010-09-17 13:01:13 -0400 |
---|---|---|
committer | Leon Scroggins III <scroggo@google.com> | 2010-09-17 13:52:00 -0400 |
commit | 8774c667dd446346dca5f5d3c89092fbc86448d0 (patch) | |
tree | d08e7c1a02b686d3d827b0b3d0b943dd833181e4 | |
parent | 3130660e0045923199c74efa7c1df9ea85501dce (diff) | |
download | packages_apps_browser-8774c667dd446346dca5f5d3c89092fbc86448d0.zip packages_apps_browser-8774c667dd446346dca5f5d3c89092fbc86448d0.tar.gz packages_apps_browser-8774c667dd446346dca5f5d3c89092fbc86448d0.tar.bz2 |
Remove "Show web suggestions" from browser settings
Bug:3011374
Change-Id: I44d57431d127e48d25a957915a2fb93dc96b1053
-rw-r--r-- | res/values/strings.xml | 6 | ||||
-rw-r--r-- | res/xml/browser_preferences.xml | 7 | ||||
-rw-r--r-- | src/com/android/browser/BrowserProvider.java | 1 | ||||
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 34 |
4 files changed, 0 insertions, 48 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index f852167..3eb9a7e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -309,12 +309,6 @@ <string name="pref_content_search_engine">Set search engine</string> <!-- Settings summary --> <string name="pref_content_search_engine_summary">Select a search engine</string> - <!-- Settings label --> - <string name="pref_content_show_search_suggestions">Show web suggestions</string> - <!-- Settings summary --> - <string name="pref_content_show_web_suggestions_summary_on">Show web suggestions as you type</string> - <!-- Settings summary --> - <string name="pref_content_show_web_suggestions_summary_off">Don\'t show web suggestions as you type</string> <!-- Settings button label --> <string name="pref_use_current">Use current page</string> <!-- Settings label --> diff --git a/res/xml/browser_preferences.xml b/res/xml/browser_preferences.xml index 501d8c1..1da85ec 100644 --- a/res/xml/browser_preferences.xml +++ b/res/xml/browser_preferences.xml @@ -200,13 +200,6 @@ android:summary="@string/pref_content_search_engine_summary" android:dialogTitle="@string/pref_content_search_engine" /> - <CheckBoxPreference - android:key="show_search_suggestions" - android:defaultValue="true" - android:title="@string/pref_content_show_search_suggestions" - android:summaryOn="@string/pref_content_show_web_suggestions_summary_on" - android:summaryOff="@string/pref_content_show_web_suggestions_summary_off" /> - <PreferenceScreen android:key="website_settings" android:title="@string/pref_extras_website_settings" diff --git a/src/com/android/browser/BrowserProvider.java b/src/com/android/browser/BrowserProvider.java index 96745e5..6c9a769 100644 --- a/src/com/android/browser/BrowserProvider.java +++ b/src/com/android/browser/BrowserProvider.java @@ -821,7 +821,6 @@ public class BrowserProvider extends ContentProvider { } else { // get search suggestions if there is still space in the list if (myArgs != null && myArgs.length > 1 - && mSettings.getShowSearchSuggestions() && c.getCount() < (MAX_SUGGESTION_SHORT_ENTRIES - 1)) { SearchEngine searchEngine = mSettings.getSearchEngine(); if (searchEngine != null && searchEngine.supportsSuggestions()) { diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java index a51c773..71777d6 100644 --- a/src/com/android/browser/BrowserSettings.java +++ b/src/com/android/browser/BrowserSettings.java @@ -80,7 +80,6 @@ class BrowserSettings extends Observable { private String defaultTextEncodingName; private String homeUrl = ""; private SearchEngine searchEngine; - private boolean showSearchSuggestions; private boolean autoFitPage; private boolean landscapeOnly; private boolean loadsPageInOverviewMode; @@ -132,7 +131,6 @@ class BrowserSettings extends Observable { public final static String PREF_CLEAR_HISTORY = "privacy_clear_history"; public final static String PREF_HOMEPAGE = "homepage"; public final static String PREF_SEARCH_ENGINE = "search_engine"; - public final static String PREF_SHOW_SEARCH_SUGGESTIONS = "show_search_suggestions"; public final static String PREF_CLEAR_FORM_DATA = "privacy_clear_form_data"; public final static String PREF_CLEAR_PASSWORDS = @@ -278,19 +276,6 @@ class BrowserSettings extends Observable { pageCacheCapacity = 1; } - final ContentResolver cr = ctx.getContentResolver(); - cr.registerContentObserver( - Settings.System.getUriFor(Settings.System.SHOW_WEB_SUGGESTIONS), false, - new ContentObserver(new Handler()) { - @Override - public void onChange(boolean selfChange) { - SharedPreferences p = - PreferenceManager.getDefaultSharedPreferences(ctx); - updateShowWebSuggestions(cr, p); - } - }); - updateShowWebSuggestions(cr, p); - // Load the defaults from the xml // This call is TOO SLOW, need to manually keep the defaults // in sync @@ -319,9 +304,6 @@ class BrowserSettings extends Observable { searchEngine = SearchEngines.get(ctx, searchEngineName); } Log.i(TAG, "Selected search engine: " + searchEngine); - showSearchSuggestions = p.getBoolean(PREF_SHOW_SEARCH_SUGGESTIONS, true); - // Persist to system settings - saveShowWebSuggestions(ctx.getContentResolver()); loadsImagesAutomatically = p.getBoolean("load_images", loadsImagesAutomatically); @@ -410,18 +392,6 @@ class BrowserSettings extends Observable { update(); } - private void saveShowWebSuggestions(ContentResolver cr) { - int value = showSearchSuggestions ? 1 : 0; - Settings.System.putInt(cr, Settings.System.SHOW_WEB_SUGGESTIONS, value); - } - - private void updateShowWebSuggestions(ContentResolver cr, SharedPreferences p) { - showSearchSuggestions = - Settings.System.getInt(cr, - Settings.System.SHOW_WEB_SUGGESTIONS, 1) == 1; - p.edit().putBoolean(PREF_SHOW_SEARCH_SUGGESTIONS, showSearchSuggestions).commit(); - } - public String getHomePage() { return homeUrl; } @@ -430,10 +400,6 @@ class BrowserSettings extends Observable { return searchEngine; } - public boolean getShowSearchSuggestions() { - return showSearchSuggestions; - } - public String getJsFlags() { return jsFlags; } |