Settings cleanup

 Bug: 3259885
 Cleans up the grouping of the settings and adds categories

Change-Id: I13666b36d8d55e0d9e17a732b5911a28a1223666
diff --git a/res/values/strings.xml b/res/values/strings.xml
index e762f8d..2a00f1d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -343,9 +343,13 @@
     <!-- Settings summary -->
     <string name="pref_content_autofit_summary">Format web pages to fit the screen</string>
 
-    <!-- Settings screen & section title for "Personal settings". These include things like
+    <!-- Settings screen & section title for "General settings". These include things like
          configuring bookmark syncing to Google servers and form auto fill settings. [CHAR-LIMIT=32] -->
-    <string name="pref_personal_title">Personal settings</string>
+    <string name="pref_general_title">General</string>
+    <!-- Settings category for sync under general settings. This includes bookmark sync with Chrome [CHAR-LIMIT=50] -->
+    <string name="pref_general_sync_title">Sync</string>
+    <!-- Settings category for autofill under general. [CHAR-LIMIT=50] -->
+    <string name="pref_general_autofill_title">Autofill</string>
     <!-- Checkbox setting to enable or disable syncing bookmarks and other data with Google Chrome. [CHAR-LIMIT=48] -->
     <string name="pref_personal_sync_with_chrome">Sync with Google Chrome</string>
     <!-- Checkbox setting to enable or disable syncing bookmarks and other data with Google Chrome. [CHAR-LIMIT=none] -->
@@ -412,14 +416,16 @@
          it through the Browser Settings menu. [CHAR-LIMIT=NONE] -->
     <string name="autofill_setup_dialog_negative_toast">AutoFill can always be configured through Browser Settings -&gt; Personal Settings.</string>
 
-    <!-- Settings screen, section title -->
-    <string name="pref_privacy_title">Privacy settings</string>
+    <!-- Settings screen, section title [CHAR-LIMIT=50] -->
+    <string name="pref_privacy_security_title">Privacy &amp; Security</string>
     <!-- Settings label -->
     <string name="pref_privacy_clear_cache">Clear cache</string>
     <!-- Settings summary -->
     <string name="pref_privacy_clear_cache_summary">Clear locally cached content and databases</string>
     <!-- Confirmation dialog message -->
     <string name="pref_privacy_clear_cache_dlg">Locally cached content and databases will be deleted.</string>
+    <!-- Cookie settings category [CHAR-LIMIT=50] -->
+    <string name="pref_privacy_cookies_title">Cookies</string>
     <!-- Settings label -->
     <string name="pref_privacy_clear_cookies">Clear all cookie data</string>
     <!-- Settings summary -->
@@ -432,6 +438,8 @@
     <string name="pref_privacy_clear_history_summary">Clear the browser navigation history</string>
     <!-- Confirmation dialog message -->
     <string name="pref_privacy_clear_history_dlg">The browser navigation history will be deleted.</string>
+    <!-- Formdata settings category [CHAR-LIMIT=50] -->
+    <string name="pref_privacy_formdata_title">Form data</string>
     <!-- Settings label -->
     <string name="pref_privacy_clear_form_data">Clear form data</string>
     <!-- Settings summary -->
@@ -444,6 +452,8 @@
     <string name="pref_privacy_clear_passwords_summary">Clear all saved passwords</string>
     <!-- Confirmation dialog message -->
     <string name="pref_privacy_clear_passwords_dlg">All saved passwords will be deleted.</string>
+    <!-- Location settings category [CHAR-LIMIT=50] -->
+    <string name="pref_privacy_location_title">Location</string>
     <!-- Settings label -->
     <string name="pref_privacy_enable_geolocation">Enable location</string>
     <!-- Settings summary -->
@@ -454,8 +464,8 @@
     <string name="pref_privacy_clear_geolocation_access_summary">Clear location access for all websites</string>
     <!-- Confirmation dialog message -->
     <string name="pref_privacy_clear_geolocation_access_dlg">Clear location access for all websites</string>
-    <!-- Settings screen, section title -->
-    <string name="pref_security_title">Security settings</string>
+    <!-- Passwords settings category [CHAR-LIMIT=50] -->
+    <string name="pref_security_passwords_title">Passwords</string>
     <!-- Settings label -->
     <string name="pref_security_remember_passwords">Remember passwords</string>
     <!-- Settings summary -->
@@ -513,11 +523,13 @@
     <!-- Settings summary -->
     <string name="pref_content_load_page_summary">Show overview of newly opened pages</string>
     <!-- Settings screen, section title -->
-    <string name="pref_extras_title">Advanced settings</string>
+    <string name="pref_extras_title">Advanced</string>
     <!-- Settings label -->
     <string name="pref_extras_website_settings">Website settings</string>
     <!-- Settings summary -->
     <string name="pref_extras_website_settings_summary">Advanced settings for individual websites</string>
+    <!-- Settings category label [CHAR-LIMIT=50] -->
+    <string name="pref_extras_reset_default_title">Reset defaults</string>
     <!-- Settings label -->
     <string name="pref_extras_reset_default">Reset to default</string>
     <!-- Settings summary -->
diff --git a/res/xml/advanced_preferences.xml b/res/xml/advanced_preferences.xml
index 075232d..3264d22 100644
--- a/res/xml/advanced_preferences.xml
+++ b/res/xml/advanced_preferences.xml
@@ -17,19 +17,89 @@
 <PreferenceScreen
         xmlns:android="http://schemas.android.com/apk/res/android">
 
-        <!-- Entries and values in this list are set dynamically. -->
-        <com.android.browser.search.SearchEnginePreference
-                android:key="search_engine"
-                android:title="@string/pref_content_search_engine"
-                android:defaultValue="google"
-                android:summary="@string/pref_content_search_engine_summary"
-                android:dialogTitle="@string/pref_content_search_engine" />
+    <!-- Entries and values in this list are set dynamically. -->
+    <com.android.browser.search.SearchEnginePreference
+            android:key="search_engine"
+            android:title="@string/pref_content_search_engine"
+            android:defaultValue="google"
+            android:summary="@string/pref_content_search_engine_summary"
+            android:dialogTitle="@string/pref_content_search_engine" />
 
-        <PreferenceScreen
-              android:key="website_settings"
-              android:title="@string/pref_extras_website_settings"
-              android:summary="@string/pref_extras_website_settings_summary" />
+    <CheckBoxPreference
+            android:key="open_in_background"
+            android:defaultValue="false"
+            android:title="@string/pref_content_open_in_background"
+            android:summary="@string/pref_content_open_in_background_summary" />
 
+    <CheckBoxPreference
+            android:key="enable_javascript"
+            android:defaultValue="true"
+            android:title="@string/pref_content_javascript" />
+
+    <ListPreference
+            android:key="plugin_state"
+            android:title="@string/pref_content_plugins"
+            android:defaultValue="ON"
+            android:entries="@array/pref_content_plugins_choices"
+            android:entryValues="@array/pref_content_plugins_values"
+            android:dialogTitle="@string/pref_content_plugins" />
+
+    <PreferenceScreen
+            android:key="website_settings"
+            android:title="@string/pref_extras_website_settings"
+            android:summary="@string/pref_extras_website_settings_summary" />
+
+    <PreferenceCategory android:title="@string/pref_content_title">
+        <ListPreference
+                android:key="text_size"
+                android:title="@string/pref_text_size"
+                android:defaultValue="NORMAL"
+                android:entries="@array/pref_text_size_choices"
+                android:entryValues="@array/pref_text_size_values"
+                android:dialogTitle="@string/pref_text_size_dialogtitle" />
+
+        <ListPreference
+                android:key="default_zoom"
+                android:title="@string/pref_default_zoom"
+                android:defaultValue="MEDIUM"
+                android:entries="@array/pref_default_zoom_choices"
+                android:entryValues="@array/pref_default_zoom_values"
+                android:dialogTitle="@string/pref_default_zoom_dialogtitle" />
+
+        <CheckBoxPreference
+                android:key="load_page"
+                android:defaultValue="true"
+                android:title="@string/pref_content_load_page"
+                android:summary="@string/pref_content_load_page_summary" />
+
+        <CheckBoxPreference
+                android:key="autofit_pages"
+                android:defaultValue="true"
+                android:title="@string/pref_content_autofit"
+                android:summary="@string/pref_content_autofit_summary" />
+
+        <CheckBoxPreference
+                android:key="block_popup_windows"
+                android:defaultValue="true"
+                android:title="@string/pref_content_block_popups" />
+
+        <CheckBoxPreference
+                android:key="load_images"
+                android:defaultValue="true"
+                android:title="@string/pref_content_load_images"
+                android:summary="@string/pref_content_load_images_summary" />
+
+        <ListPreference
+                android:key="default_text_encoding"
+                android:title="@string/pref_default_text_encoding"
+                android:defaultValue="@string/pref_default_text_encoding_default"
+                android:entries="@array/pref_default_text_encoding_choices"
+                android:entryValues="@array/pref_default_text_encoding_values"
+                android:dialogTitle="@string/pref_default_text_encoding_dialogtitle" />
+
+    </PreferenceCategory>
+
+    <PreferenceCategory android:title="@string/pref_extras_reset_default_title">
         <com.android.browser.BrowserYesNoPreference
                 android:key="reset_default_preferences"
                 android:title="@string/pref_extras_reset_default"
@@ -37,5 +107,6 @@
                 android:dialogMessage="@string/pref_extras_reset_default_dlg" 
                 android:dialogTitle="@string/pref_extras_reset_default_dlg_title" 
                 android:dialogIcon="@android:drawable/ic_dialog_alert" />
+    </PreferenceCategory>
 
 </PreferenceScreen>
diff --git a/res/xml/general_preferences.xml b/res/xml/general_preferences.xml
new file mode 100644
index 0000000..92b1f2a
--- /dev/null
+++ b/res/xml/general_preferences.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <com.android.browser.BrowserHomepagePreference
+            android:key="homepage"
+            android:title="@string/pref_content_homepage"
+            android:hint="@string/http"
+            android:inputType="textUri|textMultiLine" />
+
+    <PreferenceCategory android:title="@string/pref_general_sync_title">
+        <Preference android:key="sync_with_chrome"
+            android:title="@string/pref_personal_sync_with_chrome"
+            android:summary="@string/pref_personal_sync_with_chrome_summary"
+        />
+    </PreferenceCategory>
+
+    <PreferenceCategory android:title="@string/pref_general_autofill_title">
+        <CheckBoxPreference android:key="autofill_enabled"
+            android:title="@string/pref_autofill_enabled"
+            android:summary="@string/pref_autofill_enabled_summary"
+            android:defaultValue="true"
+        />
+
+        <PreferenceScreen
+            android:fragment="com.android.browser.AutoFillSettingsFragment"
+            android:key="autofill_profile"
+            android:title="@string/pref_autofill_profile_editor"
+            android:summary="@string/pref_autofill_profile_editor_summary" />
+    </PreferenceCategory>
+
+</PreferenceScreen>
diff --git a/res/xml/page_content_preferences.xml b/res/xml/page_content_preferences.xml
deleted file mode 100644
index 3d7791c..0000000
--- a/res/xml/page_content_preferences.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<PreferenceScreen
-        xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <ListPreference
-            android:key="text_size"
-            android:title="@string/pref_text_size"
-            android:defaultValue="NORMAL"
-            android:entries="@array/pref_text_size_choices"
-            android:entryValues="@array/pref_text_size_values"
-            android:dialogTitle="@string/pref_text_size_dialogtitle" />
-
-    <ListPreference
-            android:key="default_zoom"
-            android:title="@string/pref_default_zoom"
-            android:defaultValue="MEDIUM"
-            android:entries="@array/pref_default_zoom_choices"
-            android:entryValues="@array/pref_default_zoom_values"
-            android:dialogTitle="@string/pref_default_zoom_dialogtitle" />
-
-    <CheckBoxPreference
-            android:key="load_page"
-            android:defaultValue="true"
-            android:title="@string/pref_content_load_page"
-            android:summary="@string/pref_content_load_page_summary" />
-
-    <ListPreference
-            android:key="default_text_encoding"
-            android:title="@string/pref_default_text_encoding"
-            android:defaultValue="@string/pref_default_text_encoding_default"
-            android:entries="@array/pref_default_text_encoding_choices"
-            android:entryValues="@array/pref_default_text_encoding_values"
-            android:dialogTitle="@string/pref_default_text_encoding_dialogtitle" />
-
-    <CheckBoxPreference
-            android:key="block_popup_windows"
-            android:defaultValue="true"
-            android:title="@string/pref_content_block_popups" /> 
-
-    <CheckBoxPreference
-            android:key="load_images"
-            android:defaultValue="true"
-            android:title="@string/pref_content_load_images"
-            android:summary="@string/pref_content_load_images_summary" />   
-
-    <CheckBoxPreference
-            android:key="autofit_pages"
-            android:defaultValue="true"
-            android:title="@string/pref_content_autofit"
-            android:summary="@string/pref_content_autofit_summary" />  
-
-    <CheckBoxPreference
-            android:key="enable_javascript"
-            android:defaultValue="true"
-            android:title="@string/pref_content_javascript" />     
-
-    <ListPreference
-            android:key="plugin_state"
-            android:title="@string/pref_content_plugins"
-            android:defaultValue="ON"
-            android:entries="@array/pref_content_plugins_choices"
-            android:entryValues="@array/pref_content_plugins_values"
-            android:dialogTitle="@string/pref_content_plugins" />
-
-    <CheckBoxPreference
-            android:key="open_in_background"
-            android:defaultValue="false"
-            android:title="@string/pref_content_open_in_background"
-            android:summary="@string/pref_content_open_in_background_summary" />
-
-    <com.android.browser.BrowserHomepagePreference
-            android:key="homepage" 
-            android:title="@string/pref_content_homepage"
-            android:hint="@string/http"
-            android:inputType="textUri|textMultiLine" />
-
-</PreferenceScreen>
diff --git a/res/xml/personal_preferences.xml b/res/xml/personal_preferences.xml
deleted file mode 100644
index 30ebae2..0000000
--- a/res/xml/personal_preferences.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <Preference android:key="sync_with_chrome"
-        android:title="@string/pref_personal_sync_with_chrome"
-        android:summary="@string/pref_personal_sync_with_chrome_summary"
-    />
-
-    <CheckBoxPreference android:key="autofill_enabled"
-        android:title="@string/pref_autofill_enabled"
-        android:summary="@string/pref_autofill_enabled_summary"
-        android:defaultValue="true"
-    />
-
-    <PreferenceScreen
-        android:fragment="com.android.browser.AutoFillSettingsFragment"
-        android:key="autofill_profile"
-        android:title="@string/pref_autofill_profile_editor"
-        android:summary="@string/pref_autofill_profile_editor_summary" />
-
-</PreferenceScreen>
diff --git a/res/xml/preference_headers.xml b/res/xml/preference_headers.xml
index 8533a3a..cdf259c 100644
--- a/res/xml/preference_headers.xml
+++ b/res/xml/preference_headers.xml
@@ -16,20 +16,12 @@
 
 <preference-headers xmlns:android="http://schemas.android.com/apk/res/android">
 
-    <header android:fragment="com.android.browser.preferences.PageContentPreferencesFragment"
-        android:title="@string/pref_content_title"
+    <header android:fragment="com.android.browser.preferences.GeneralPreferencesFragment"
+        android:title="@string/pref_general_title"
     />
 
-    <header android:fragment="com.android.browser.preferences.PersonalPreferencesFragment"
-        android:title="@string/pref_personal_title"
-    />
-
-    <header android:fragment="com.android.browser.preferences.PrivacyPreferencesFragment"
-        android:title="@string/pref_privacy_title"
-    />
-    
-    <header android:fragment="com.android.browser.preferences.SecurityPreferencesFragment"
-        android:title="@string/pref_security_title"
+    <header android:fragment="com.android.browser.preferences.PrivacySecurityPreferencesFragment"
+        android:title="@string/pref_privacy_security_title"
     />
 
     <header android:fragment="com.android.browser.preferences.AdvancedPreferencesFragment"
diff --git a/res/xml/privacy_preferences.xml b/res/xml/privacy_preferences.xml
deleted file mode 100644
index a6ea16b..0000000
--- a/res/xml/privacy_preferences.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<PreferenceScreen
-        xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <com.android.browser.BrowserYesNoPreference
-            android:key="privacy_clear_cache"
-            android:title="@string/pref_privacy_clear_cache"
-            android:summary="@string/pref_privacy_clear_cache_summary"
-            android:dialogMessage="@string/pref_privacy_clear_cache_dlg"
-            android:dialogTitle="@string/clear"
-            android:dialogIcon="@android:drawable/ic_dialog_alert" />
-
-    <com.android.browser.BrowserYesNoPreference
-            android:key="privacy_clear_history"
-            android:title="@string/pref_privacy_clear_history"
-            android:summary="@string/pref_privacy_clear_history_summary"
-            android:dialogMessage="@string/pref_privacy_clear_history_dlg"
-            android:dialogTitle="@string/clear"
-            android:dialogIcon="@android:drawable/ic_dialog_alert"/>
-
-    <CheckBoxPreference
-            android:key="accept_cookies"
-            android:defaultValue="true"
-            android:title="@string/pref_security_accept_cookies"
-            android:summary="@string/pref_security_accept_cookies_summary" />
-
-    <com.android.browser.BrowserYesNoPreference
-            android:key="privacy_clear_cookies"
-            android:title="@string/pref_privacy_clear_cookies"
-            android:summary="@string/pref_privacy_clear_cookies_summary"
-            android:dialogMessage="@string/pref_privacy_clear_cookies_dlg"
-            android:dialogTitle="@string/clear"
-            android:dialogIcon="@android:drawable/ic_dialog_alert"/>
-
-    <CheckBoxPreference
-            android:key="save_formdata"
-            android:defaultValue="true"
-            android:title="@string/pref_security_save_form_data"
-            android:summary="@string/pref_security_save_form_data_summary" />
-
-    <com.android.browser.BrowserYesNoPreference
-            android:key="privacy_clear_form_data"
-            android:title="@string/pref_privacy_clear_form_data"
-            android:summary="@string/pref_privacy_clear_form_data_summary"
-            android:dialogMessage="@string/pref_privacy_clear_form_data_dlg"
-            android:dialogTitle="@string/clear"
-            android:dialogIcon="@android:drawable/ic_dialog_alert"/>
-
-    <CheckBoxPreference
-            android:key="enable_geolocation"
-            android:defaultValue="true"
-            android:title="@string/pref_privacy_enable_geolocation"
-            android:summary="@string/pref_privacy_enable_geolocation_summary" />
-
-    <com.android.browser.BrowserYesNoPreference
-            android:key="privacy_clear_geolocation_access"
-            android:dependency="enable_geolocation"
-            android:title="@string/pref_privacy_clear_geolocation_access"
-            android:summary="@string/pref_privacy_clear_geolocation_access_summary"
-            android:dialogMessage="@string/pref_privacy_clear_geolocation_access_dlg"
-            android:dialogTitle="@string/clear"
-            android:dialogIcon="@android:drawable/ic_dialog_alert"/>
-
-</PreferenceScreen>
diff --git a/res/xml/privacy_security_preferences.xml b/res/xml/privacy_security_preferences.xml
new file mode 100644
index 0000000..50802ca
--- /dev/null
+++ b/res/xml/privacy_security_preferences.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<PreferenceScreen
+        xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <com.android.browser.BrowserYesNoPreference
+            android:key="privacy_clear_cache"
+            android:title="@string/pref_privacy_clear_cache"
+            android:summary="@string/pref_privacy_clear_cache_summary"
+            android:dialogMessage="@string/pref_privacy_clear_cache_dlg"
+            android:dialogTitle="@string/clear"
+            android:dialogIcon="@android:drawable/ic_dialog_alert" />
+
+    <com.android.browser.BrowserYesNoPreference
+            android:key="privacy_clear_history"
+            android:title="@string/pref_privacy_clear_history"
+            android:summary="@string/pref_privacy_clear_history_summary"
+            android:dialogMessage="@string/pref_privacy_clear_history_dlg"
+            android:dialogTitle="@string/clear"
+            android:dialogIcon="@android:drawable/ic_dialog_alert"/>
+
+    <CheckBoxPreference
+            android:key="show_security_warnings"
+            android:defaultValue="true"
+            android:title="@string/pref_security_show_security_warning"
+            android:summary="@string/pref_security_show_security_warning_summary" />
+
+    <PreferenceCategory android:title="@string/pref_privacy_cookies_title">
+        <CheckBoxPreference
+                android:key="accept_cookies"
+                android:defaultValue="true"
+                android:title="@string/pref_security_accept_cookies"
+                android:summary="@string/pref_security_accept_cookies_summary" />
+
+        <com.android.browser.BrowserYesNoPreference
+                android:key="privacy_clear_cookies"
+                android:title="@string/pref_privacy_clear_cookies"
+                android:summary="@string/pref_privacy_clear_cookies_summary"
+                android:dialogMessage="@string/pref_privacy_clear_cookies_dlg"
+                android:dialogTitle="@string/clear"
+                android:dialogIcon="@android:drawable/ic_dialog_alert"/>
+    </PreferenceCategory>
+
+    <PreferenceCategory android:title="@string/pref_privacy_formdata_title">
+        <CheckBoxPreference
+                android:key="save_formdata"
+                android:defaultValue="true"
+                android:title="@string/pref_security_save_form_data"
+                android:summary="@string/pref_security_save_form_data_summary" />
+
+        <com.android.browser.BrowserYesNoPreference
+                android:key="privacy_clear_form_data"
+                android:title="@string/pref_privacy_clear_form_data"
+                android:summary="@string/pref_privacy_clear_form_data_summary"
+                android:dialogMessage="@string/pref_privacy_clear_form_data_dlg"
+                android:dialogTitle="@string/clear"
+                android:dialogIcon="@android:drawable/ic_dialog_alert"/>
+    </PreferenceCategory>
+
+    <PreferenceCategory android:title="@string/pref_privacy_location_title">
+        <CheckBoxPreference
+                android:key="enable_geolocation"
+                android:defaultValue="true"
+                android:title="@string/pref_privacy_enable_geolocation"
+                android:summary="@string/pref_privacy_enable_geolocation_summary" />
+
+        <com.android.browser.BrowserYesNoPreference
+                android:key="privacy_clear_geolocation_access"
+                android:dependency="enable_geolocation"
+                android:title="@string/pref_privacy_clear_geolocation_access"
+                android:summary="@string/pref_privacy_clear_geolocation_access_summary"
+                android:dialogMessage="@string/pref_privacy_clear_geolocation_access_dlg"
+                android:dialogTitle="@string/clear"
+                android:dialogIcon="@android:drawable/ic_dialog_alert"/>
+    </PreferenceCategory>
+
+    <PreferenceCategory android:title="@string/pref_security_passwords_title">
+        <CheckBoxPreference
+                android:key="remember_passwords"
+                android:defaultValue="true"
+                android:title="@string/pref_security_remember_passwords"
+                android:summary="@string/pref_security_remember_passwords_summary" />
+
+        <com.android.browser.BrowserYesNoPreference
+                android:key="privacy_clear_passwords"
+                android:title="@string/pref_privacy_clear_passwords"
+                android:summary="@string/pref_privacy_clear_passwords_summary"
+                android:dialogMessage="@string/pref_privacy_clear_passwords_dlg" 
+                android:dialogTitle="@string/clear" 
+                android:dialogIcon="@android:drawable/ic_dialog_alert"/>
+    </PreferenceCategory>
+
+</PreferenceScreen>
diff --git a/res/xml/security_preferences.xml b/res/xml/security_preferences.xml
deleted file mode 100644
index 8d4464b..0000000
--- a/res/xml/security_preferences.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<PreferenceScreen
-        xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <CheckBoxPreference
-            android:key="remember_passwords"
-            android:defaultValue="true"
-            android:title="@string/pref_security_remember_passwords"
-            android:summary="@string/pref_security_remember_passwords_summary" />
-
-    <com.android.browser.BrowserYesNoPreference
-            android:key="privacy_clear_passwords"
-            android:title="@string/pref_privacy_clear_passwords"
-            android:summary="@string/pref_privacy_clear_passwords_summary"
-            android:dialogMessage="@string/pref_privacy_clear_passwords_dlg" 
-            android:dialogTitle="@string/clear" 
-            android:dialogIcon="@android:drawable/ic_dialog_alert"/>
-            
-    <CheckBoxPreference
-            android:key="show_security_warnings"
-            android:defaultValue="true"
-            android:title="@string/pref_security_show_security_warning"
-            android:summary="@string/pref_security_show_security_warning_summary" />
-
-</PreferenceScreen>