summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeon Scroggins III <scroggo@google.com>2010-09-17 14:31:45 -0400
committerLeon Scroggins III <scroggo@google.com>2010-09-17 14:31:45 -0400
commit6a6d510c013a078aea890f91149022b3f57a0e51 (patch)
tree8b2e6f8f994e1fe82d1ba843177d13fb5be6cd70
parent18a1e1d1df382e1769609059a64a838544f7e8eb (diff)
parentfc2c6f1da5e614c7740be376817cebc8877db143 (diff)
downloadpackages_apps_Browser-6a6d510c013a078aea890f91149022b3f57a0e51.zip
packages_apps_Browser-6a6d510c013a078aea890f91149022b3f57a0e51.tar.gz
packages_apps_Browser-6a6d510c013a078aea890f91149022b3f57a0e51.tar.bz2
resolved conflicts for merge of fc2c6f1d to master
Change-Id: I708443617cf602a957a90a5770deab77c47c776f
-rw-r--r--res/values/strings.xml6
-rw-r--r--res/xml/browser_preferences.xml7
-rw-r--r--src/com/android/browser/BrowserProvider.java3
-rw-r--r--src/com/android/browser/BrowserSettings.java34
4 files changed, 1 insertions, 49 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d6d3609..1d21fc8 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -304,12 +304,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 1320e83..358fd35 100644
--- a/src/com/android/browser/BrowserProvider.java
+++ b/src/com/android/browser/BrowserProvider.java
@@ -890,8 +890,7 @@ 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_SUGGEST_SHORT_SMALL - 1)) {
+ && c.getCount() < (MAX_SUGGESTION_SHORT_ENTRIES - 1)) {
SearchEngine searchEngine = mSettings.getSearchEngine();
if (searchEngine != null && searchEngine.supportsSuggestions()) {
Cursor sc = searchEngine.getSuggestions(getContext(), selectionArgs[0]);
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 7d5bbf6..cb4918b 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -81,7 +81,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;
@@ -133,7 +132,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 =
@@ -298,19 +296,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
@@ -339,9 +324,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);
@@ -430,18 +412,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;
}
@@ -450,10 +420,6 @@ class BrowserSettings extends Observable {
return searchEngine;
}
- public boolean getShowSearchSuggestions() {
- return showSearchSuggestions;
- }
-
public String getJsFlags() {
return jsFlags;
}