Remove form data options from API >= 26. https://redmine.stoutner.com/issues/185
[PrivacyBrowser.git] / app / src / main / res / xml / preferences.xml
index 813c1ca2c6f6cb4a169e182d29c8a8e26ddb3c08..e38eed8888d1c682f522304727a1a3fba4f74f2d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright 2016 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2016-2018 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
             android:summary="@string/dom_storage_preference_summary"
             android:defaultValue="false" />
 
+        <!-- Save form data can be removed once the minimum API >= 26. -->
+        <SwitchPreference
+            android:key="save_form_data_enabled"
+            android:title="@string/save_form_data_preference"
+            android:summary="@string/save_form_data_preference_summary"
+            android:defaultValue="false" />
+
         <ListPreference
             android:key="user_agent"
             android:title="@string/user_agent"
-            android:entries="@array/user_agent_entries"
-            android:entryValues="@array/user_agent_entry_values"
-            android:defaultValue="" />
+            android:entries="@array/translated_user_agent_names"
+            android:entryValues="@array/user_agent_names"
+            android:defaultValue="Privacy Browser"
+            android:icon="?attr/userAgentIcon" />
 
-        // Android doesn't let EditTextPreferences have more than one line, but I include singleLine="false" in case they ever wisen up.
+        <!-- android:inputType="textVisiblePassword" sets the keyboard to have a dedicated number row.-->
         <EditTextPreference
             android:key="custom_user_agent"
             android:title="@string/custom_user_agent"
             android:defaultValue="PrivacyBrowser/1.0"
-            android:inputType="textUri"
-            android:singleLine="false"/>
+            android:inputType="textVisiblePassword|textMultiLine" />
+
+        <SwitchPreference
+            android:key="incognito_mode"
+            android:title="@string/incognito_mode"
+            android:summary="@string/incognito_mode_summary"
+            android:defaultValue="false" />
+
+        <SwitchPreference
+            android:key="do_not_track"
+            android:title="@string/do_not_track"
+            android:summary="@string/do_not_track_summary"
+            android:defaultValue="false" />
+
+        <SwitchPreference
+            android:key="allow_screenshots"
+            android:title="@string/allow_screenshots"
+            android:summary="@string/allow_screenshots_summary"
+            android:defaultValue="false" />
     </PreferenceCategory>
 
     <PreferenceCategory
-        android:key="search"
-        android:title="@string/search">
+        android:key="block_lists"
+        android:title="@string/block_lists" >
+
+        <SwitchPreference
+            android:key="easylist"
+            android:title="@string/easylist"
+            android:summary="@string/easylist_summary"
+            android:defaultValue="true" />
+
+        <SwitchPreference
+            android:key="easyprivacy"
+            android:title="@string/easyprivacy"
+            android:summary="@string/easyprivacy_summary"
+            android:defaultValue="true" />
+
+        <SwitchPreference
+            android:key="fanboy_annoyance_list"
+            android:title="@string/fanboy_annoyance_list"
+            android:summary="@string/fanboy_annoyance_list_summary"
+            android:defaultValue="true" />
+
+        <SwitchPreference
+            android:key="fanboy_social_blocking_list"
+            android:title="@string/fanboy_social_blocking_list"
+            android:summary="@string/fanboy_social_blocking_list_summary"
+            android:defaultValue="true" />
+    </PreferenceCategory>
+
+    <PreferenceCategory
+        android:key="tor"
+        android:title="@string/tor" >
+
+        <SwitchPreference
+            android:key="proxy_through_orbot"
+            android:title="@string/proxy_through_orbot"
+            android:summary="@string/proxy_through_orbot_summary"
+            android:defaultValue="false" />
+
+        <EditTextPreference
+            android:key="tor_homepage"
+            android:title="@string/tor_homepage"
+            android:defaultValue="https://3g2upl4pq6kufc4m.onion/"
+            android:inputType="textUri" />
 
         <ListPreference
-            android:key="javascript_disabled_search"
-            android:title="@string/javascript_disabled_search"
-            android:entries="@array/javascript_disabled_search_entries"
-            android:entryValues="@array/javascript_disabled_search_entry_values"
-            android:defaultValue="https://duckduckgo.com/html/?q=" />
+            android:key="tor_search"
+            android:title="@string/tor_search"
+            android:entries="@array/tor_search_entries"
+            android:entryValues="@array/tor_search_entry_values"
+            android:defaultValue="https://3g2upl4pq6kufc4m.onion/html/?q=" />
 
+        <!--suppress AndroidDomInspection -->
+        <!--`suppress AndroidDomInspection` removes the error about the default value being blank. -->
         <EditTextPreference
-            android:key="javascript_disabled_search_custom_url"
-            android:title="@string/javascript_disabled_search_custom_url"
+            android:key="tor_search_custom_url"
+            android:title="@string/tor_search_custom_url"
             android:defaultValue=""
-            android:inputType="textUri"
-            android:singleLine="true" />
+            android:inputType="textUri" />
+    </PreferenceCategory>
+
+    <PreferenceCategory
+        android:key="search_category"
+        android:title="@string/search" >
 
         <ListPreference
-            android:key="javascript_enabled_search"
-            android:title="@string/javascript_enabled_search"
-            android:entries="@array/javascript_enabled_search_entries"
-            android:entryValues="@array/javascript_enabled_search_entry_values"
-            android:defaultValue="https://duckduckgo.com/?q=" />
+            android:key="search"
+            android:title="@string/search"
+            android:entries="@array/search_entries"
+            android:entryValues="@array/search_entry_values"
+            android:defaultValue="https://duckduckgo.com/html/?q="
+            android:icon="?attr/searchIcon" />
 
+        <!--suppress AndroidDomInspection -->
+        <!--`suppress AndroidDomInspection` removes the error about the default value being blank. -->
         <EditTextPreference
-            android:key="javascript_enabled_search_custom_url"
-            android:title="@string/javascript_enabled_search_custom_url"
+            android:key="search_custom_url"
+            android:title="@string/search_custom_url"
             android:defaultValue=""
-            android:inputType="textUri"
-            android:singleLine="true" />
+            android:inputType="textUri" />
+    </PreferenceCategory>
+
+    <PreferenceCategory
+        android:key="full_screen"
+        android:title="@string/full_screen" >
+
+        <SwitchPreference
+            android:key="full_screen_browsing_mode"
+            android:title="@string/full_screen_browsing_mode"
+            android:summary="@string/full_screen_browsing_mode_summary"
+            android:defaultValue="false" />
+
+        <SwitchPreference
+            android:key="hide_system_bars"
+            android:title="@string/hide_system_bars"
+            android:summary="@string/hide_system_bars_summary"
+            android:defaultValue="false" />
+
+        <SwitchPreference
+            android:key="translucent_navigation_bar"
+            android:title="@string/translucent_navigation_bar"
+            android:summary="@string/translucent_navigation_bar_summary"
+            android:defaultValue="true" />
+    </PreferenceCategory>
+
+    <PreferenceCategory
+        android:key="clear_and_exit"
+        android:title="@string/clear_and_exit" >
+
+        <SwitchPreference
+            android:key="clear_everything"
+            android:title="@string/clear_everything"
+            android:summary="@string/clear_everything_summary"
+            android:defaultValue="true" />
+
+        <SwitchPreference
+            android:key="clear_cookies"
+            android:title="@string/clear_cookies_preference"
+            android:summary="@string/clear_cookies_summary"
+            android:defaultValue="true" />
+
+        <SwitchPreference
+            android:key="clear_dom_storage"
+            android:title="@string/clear_dom_storage_preference"
+            android:summary="@string/clear_dom_storage_summary"
+            android:defaultValue="true" />
+
+        <SwitchPreference
+            android:key="clear_form_data"
+            android:title="@string/clear_form_data_preference"
+            android:summary="@string/clear_form_data_summary"
+            android:defaultValue="true" />
+
+        <SwitchPreference
+            android:key="clear_cache"
+            android:title="@string/clear_cache"
+            android:summary="@string/clear_cache_summary"
+            android:defaultValue="true" />
     </PreferenceCategory>
 
     <PreferenceCategory
 
         <EditTextPreference
             android:key="homepage"
-            android:title="@string/homepage_preference"
-            android:defaultValue="https://www.duckduckgo.com"
+            android:title="@string/homepage"
+            android:defaultValue="https://duckduckgo.com/?kao=-1&amp;kak=-1"
             android:inputType="textUri"
-            android:singleLine="true" />
+            android:icon="?attr/homepageIcon" />
+
+        <ListPreference
+            android:key="default_font_size"
+            android:title="@string/default_font_size"
+            android:entries="@array/default_font_size_entries"
+            android:entryValues="@array/default_font_size_entry_values"
+            android:defaultValue="100"
+            android:icon="?attr/fontSizeIcon" />
+
+        <SwitchPreference
+            android:key="swipe_to_refresh"
+            android:title="@string/swipe_to_refresh_preference"
+            android:summary="@string/swipe_to_refresh_summary"
+            android:defaultValue="true" />
+
+        <SwitchPreference
+            android:key="display_additional_app_bar_icons"
+            android:title="@string/display_additional_app_bar_icons"
+            android:summary="@string/display_additional_app_bar_icons_summary"
+            android:defaultValue="false" />
+
+        <SwitchPreference
+            android:key="dark_theme"
+            android:title="@string/dark_theme"
+            android:summary="@string/dark_theme_summary"
+            android:defaultValue="false" />
+
+        <SwitchPreference
+            android:key="night_mode"
+            android:title="@string/night_mode"
+            android:summary="@string/night_mode_summary"
+            android:defaultValue="false" />
 
         <SwitchPreference
-            android:key="swipe_to_refresh_enabled"
-            android:title="@string/swipe_to_refresh_enabled"
-            android:summary="@string/swipe_to_refresh_enabled_summary"
+            android:key="display_webpage_images"
+            android:title="@string/display_webpage_images"
+            android:summary="@string/display_webpage_images_summary"
             android:defaultValue="true" />
     </PreferenceCategory>
 </PreferenceScreen>
\ No newline at end of file