resolved conflicts for merge of fc2c6f1d to master

Change-Id: I708443617cf602a957a90a5770deab77c47c776f
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 @@
         } 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 @@
     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 @@
     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 @@
             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 @@
             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 @@
         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 @@
         return searchEngine;
     }
 
-    public boolean getShowSearchSuggestions() {
-        return showSearchSuggestions;
-    }
-
     public String getJsFlags() {
         return jsFlags;
     }