diff options
author | Pankaj Garg <pgarg@codeaurora.org> | 2015-06-03 18:13:24 -0700 |
---|---|---|
committer | jrizzoli <joey@cyanogenmoditalia.it> | 2015-08-28 13:15:45 +0200 |
commit | 32e1b940b71a96d55bd7b9cedf31fc4aacdbfec1 (patch) | |
tree | b988b99456730b9d3b0a48f8b197bff903e61803 /res/xml | |
parent | 53ef89355c4cd8511d3dfc2bc5a336f7d60ad4a9 (diff) | |
download | android_packages_apps_Gello-32e1b940b71a96d55bd7b9cedf31fc4aacdbfec1.tar.gz android_packages_apps_Gello-32e1b940b71a96d55bd7b9cedf31fc4aacdbfec1.tar.bz2 android_packages_apps_Gello-32e1b940b71a96d55bd7b9cedf31fc4aacdbfec1.zip |
Security and Privacy UI
- new panel for site specific settings
- hooked up favicon to site settings
- new images for security icons
- revamped settings panels to match the new
ui layouts
Change-Id: I1e872ce353e66f78e2b0530901fcbb7de69e28b4
Diffstat (limited to 'res/xml')
-rw-r--r-- | res/xml/accessibility_preferences.xml | 6 | ||||
-rw-r--r-- | res/xml/bandwidth_preferences.xml | 2 | ||||
-rw-r--r-- | res/xml/content_preferences.xml | 67 | ||||
-rw-r--r-- | res/xml/debug_preferences.xml | 31 | ||||
-rw-r--r-- | res/xml/download_settings_preferences.xml | 7 | ||||
-rw-r--r-- | res/xml/general_preferences.xml | 171 | ||||
-rw-r--r-- | res/xml/privacy_and_security_preferences.xml | 184 | ||||
-rw-r--r-- | res/xml/site_specific_preferences.xml | 119 |
8 files changed, 431 insertions, 156 deletions
diff --git a/res/xml/accessibility_preferences.xml b/res/xml/accessibility_preferences.xml index 68bc4840..506a9ed2 100644 --- a/res/xml/accessibility_preferences.xml +++ b/res/xml/accessibility_preferences.xml @@ -17,7 +17,9 @@ <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> - <PreferenceCategory android:title="@string/pref_font_size_category"> + <PreferenceCategory + android:layout="@layout/swe_preference_category_first" + android:title="@string/pref_font_size_category"> <com.android.browser.preferences.FontSizePreview android:title="@string/preview" /> <com.android.browser.preferences.SeekBarSummaryPreference android:defaultValue="10" @@ -31,7 +33,7 @@ android:max="20" android:title="@string/pref_min_font_size" /> - <CheckBoxPreference + <SwitchPreference android:defaultValue="false" android:key="force_userscalable" android:summary="@string/pref_force_userscalable_summary" diff --git a/res/xml/bandwidth_preferences.xml b/res/xml/bandwidth_preferences.xml index 9946b48d..a31d0e84 100644 --- a/res/xml/bandwidth_preferences.xml +++ b/res/xml/bandwidth_preferences.xml @@ -32,7 +32,7 @@ android:entryValues="@array/pref_link_prefetch_values" android:dialogTitle="@string/pref_link_prefetch_dialogtitle" /> - <CheckBoxPreference + <SwitchPreference android:key="load_images" android:defaultValue="true" android:title="@string/pref_content_load_images" diff --git a/res/xml/content_preferences.xml b/res/xml/content_preferences.xml new file mode 100644 index 00000000..68fc90ab --- /dev/null +++ b/res/xml/content_preferences.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2015, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> + +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" + android:key="content_settings"> + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="false" + android:key="open_in_background" + android:summary="@string/pref_content_open_in_background_summary" + android:title="@string/pref_content_open_in_background" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="true" + android:key="enable_javascript" + android:title="@string/pref_content_javascript" /> + + <PreferenceScreen + android:key="download_path_setting_screen" + android:title="@string/pref_download_path_setting_screen_title"/> + + <ListPreference + android:layout="@layout/swe_preference" + android:widgetLayout="@layout/swe_preference_list_widget" + android:defaultValue="@string/pref_default_text_encoding_default" + android:dialogTitle="@string/pref_default_text_encoding_dialogtitle" + android:entries="@array/pref_default_text_encoding_choices" + android:entryValues="@array/pref_default_text_encoding_values" + android:key="default_text_encoding" + android:title="@string/pref_default_text_encoding" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:key="load_images" + android:defaultValue="true" + android:title="@string/pref_content_load_images" + android:summary="@string/pref_content_load_images_summary" /> + +</PreferenceScreen> diff --git a/res/xml/debug_preferences.xml b/res/xml/debug_preferences.xml index dc6b7230..f23ce121 100644 --- a/res/xml/debug_preferences.xml +++ b/res/xml/debug_preferences.xml @@ -17,58 +17,69 @@ <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:key="enable_hardware_accel" android:defaultValue="true" android:title="@string/pref_development_hardware_accel" /> - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:key="enable_hardware_accel_skia" android:defaultValue="false" android:title="@string/pref_development_hardware_accel_skia" android:enabled="false" /> - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:key="enable_visual_indicator" android:defaultValue="false" android:title="@string/pref_development_visual_indicator" /> - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:key="enable_cpu_upload_path" android:defaultValue="false" android:title="@string/pref_development_cpu_upload_path" /> - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:key="small_screen" android:defaultValue="false" android:title="@string/pref_development_single_column_rendering" /> - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:key="wide_viewport" android:defaultValue="true" android:title="@string/pref_development_viewport" /> - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:key="normal_layout" android:defaultValue="false" android:title="@string/pref_development_normal_rendering" /> - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:key="enable_tracing" android:defaultValue="false" android:title="@string/pref_development_trace" /> - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:key="enable_light_touch" android:defaultValue="false" android:title="Enable light touch" /> - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:key="enable_nav_dump" android:defaultValue="false" android:title="@string/pref_development_nav_dump" /> <EditTextPreference + android:layout="@layout/swe_preference" android:key="js_engine_flags" android:title="@string/js_engine_flags" android:singleLine="true" /> diff --git a/res/xml/download_settings_preferences.xml b/res/xml/download_settings_preferences.xml index 0cd99a98..91a1859c 100644 --- a/res/xml/download_settings_preferences.xml +++ b/res/xml/download_settings_preferences.xml @@ -31,9 +31,10 @@ xmlns:android="http://schemas.android.com/apk/res/android" > <PreferenceCategory - android:title="@string/pref_download_title" - android:key="download_path_setting_category"> - <PreferenceScreen + android:layout="@layout/swe_preference_category_first" + android:title="@string/pref_download_title" + android:key="download_path_setting_category"> + <PreferenceScreen android:key="download_path_setting_screen" android:title="@string/pref_download_path_setting_screen_title"/> diff --git a/res/xml/general_preferences.xml b/res/xml/general_preferences.xml index 816503b2..7571a6a1 100644 --- a/res/xml/general_preferences.xml +++ b/res/xml/general_preferences.xml @@ -16,204 +16,94 @@ <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> - <PreferenceCategory android:title="@string/pref_general_title"> + <PreferenceCategory + android:layout="@layout/swe_preference_category_first" + android:title="@string/pref_general_title"> <com.android.browser.preferences.NonformattingListPreference + android:layout="@layout/swe_preference" + android:widgetLayout="@layout/swe_preference_list_widget" android:key="homepage_picker" android:entries="@array/pref_homepage_choices" android:entryValues="@array/pref_homepage_values" android:title="@string/pref_content_homepage" /> <com.android.browser.search.SearchEnginePreference + android:layout="@layout/swe_preference" + android:widgetLayout="@layout/swe_preference_list_widget" android:defaultValue="@string/default_search_engine_value" android:dialogTitle="@string/pref_content_search_engine" android:key="search_engine" android:summary="@string/pref_content_search_engine_summary" android:title="@string/pref_content_search_engine" /> - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:defaultValue="false" android:key="fullscreen" android:summary="@string/pref_lab_fullscreen_summary" android:title="@string/pref_lab_fullscreen" /> - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:defaultValue="false" android:key="powersave_enabled" android:summary="@string/pref_powersave_enabled_summary" android:title="@string/pref_powersave_enabled" /> - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:defaultValue="false" android:key="nightmode_enabled" android:summary="@string/pref_nightmode_enabled_summary" android:title="@string/pref_nightmode_enabled" /> - <CheckBoxPreference + <SwitchPreference + android:layout="@layout/swe_preference" android:key="autofill_enabled" android:title="@string/pref_autofill_enabled" android:summary="@string/pref_autofill_enabled_summary" android:defaultValue="true" /> - <CheckBoxPreference - android:key="web_refiner_enabled" - android:title="@string/pref_web_refiner_enabled" - android:summary="@string/pref_web_refiner_enabled_summary" - android:defaultValue="true" /> - <PreferenceScreen + android:layout="@layout/swe_preference" android:key="autofill_profile" android:title="@string/pref_autofill_profile_editor" android:summary="@string/pref_autofill_profile_editor_summary" /> </PreferenceCategory> <PreferenceCategory android:title="@string/pref_extras_title" + android:layout="@layout/swe_preference_category" android:key="advanced"> <PreferenceScreen android:title="@string/pref_privacy_security_title" - android:key="privacy_security"> - <PreferenceScreen android:title="@string/webstorage_clear_data_title" - android:key="clear_data"> - <com.android.browser.BrowserYesNoPreference - android:dialogIcon="@android:drawable/ic_dialog_alert" - android:dialogMessage="@string/pref_privacy_clear_selected_dlg" - android:key="privacy_clear_selected" - android:summary="@string/pref_privacy_clear_selected_summary" - android:title="@string/pref_privacy_clear_selected" /> - - <CheckBoxPreference - android:defaultValue="true" - android:key="privacy_clear_history" - android:summary="@string/pref_privacy_clear_history_summary" - android:title="@string/pref_privacy_clear_history" /> - - <CheckBoxPreference - android:defaultValue="true" - android:key="privacy_clear_cache" - android:summary="@string/pref_privacy_clear_cache_summary" - android:title="@string/pref_privacy_clear_cache" /> - - <CheckBoxPreference - android:defaultValue="true" - android:key="privacy_clear_cookies" - android:summary="@string/pref_privacy_clear_cookies_summary" - android:title="@string/pref_privacy_clear_cookies" /> - - <CheckBoxPreference - android:defaultValue="true" - android:key="privacy_clear_form_data" - android:summary="@string/pref_privacy_clear_form_data_summary" - android:title="@string/pref_privacy_clear_form_data" /> - - <CheckBoxPreference - android:defaultValue="true" - android:key="privacy_clear_passwords" - android:summary="@string/pref_privacy_clear_passwords_summary" - android:title="@string/pref_privacy_clear_passwords" /> - - <CheckBoxPreference - android:defaultValue="true" - android:dependency="enable_geolocation" - android:key="privacy_clear_geolocation_access" - android:summary="@string/pref_privacy_clear_geolocation_access_summary" - android:title="@string/pref_privacy_clear_geolocation_access" /> - - </PreferenceScreen> - - <CheckBoxPreference - android:defaultValue="true" - android:key="show_security_warnings" - android:summary="@string/pref_security_show_security_warning_summary" - android:title="@string/pref_security_show_security_warning" /> - - <com.android.browser.mdm.MdmCheckBoxPreference - android:defaultValue="true" - android:key="do_not_track" - android:summary="@string/pref_do_not_track_summary" - android:title="@string/pref_do_not_track" /> - - <CheckBoxPreference - android:defaultValue="true" - android:key="accept_cookies" - android:summary="@string/pref_security_accept_cookies_summary" - android:title="@string/pref_security_accept_cookies" /> - - <CheckBoxPreference - android:defaultValue="true" - android:key="save_formdata" - android:summary="@string/pref_security_save_form_data_summary" - android:title="@string/pref_security_save_form_data" /> - - <CheckBoxPreference - android:defaultValue="true" - android:key="enable_geolocation" - android:summary="@string/pref_privacy_enable_geolocation_summary" - android:title="@string/pref_privacy_enable_geolocation" /> - - <CheckBoxPreference - android:defaultValue="true" - android:key="remember_passwords" - android:summary="@string/pref_security_remember_passwords_summary" - android:title="@string/pref_security_remember_passwords" /> - - </PreferenceScreen> + android:summary="@string/pref_privacy_security_title_summary" + android:layout="@layout/swe_preference" + android:key="privacy_security" /> <PreferenceScreen + android:layout="@layout/swe_preference" android:key="accessibility_menu" - android:title="@string/pref_accessibility_title" /> + android:summary="@string/pref_accessibility_title_summary" + android:title="@string/pref_accessibility_title"/> <PreferenceScreen android:title="@string/pref_content_title" - android:key="content_settings"> - <CheckBoxPreference - android:defaultValue="true" - android:key="block_popup_windows" - android:title="@string/pref_content_block_popups" /> - - <CheckBoxPreference - android:defaultValue="false" - android:key="open_in_background" - android:summary="@string/pref_content_open_in_background_summary" - android:title="@string/pref_content_open_in_background" /> - - <CheckBoxPreference - android:defaultValue="true" - android:key="enable_javascript" - android:title="@string/pref_content_javascript" /> - - <PreferenceScreen - android:key="download_path_setting_screen" - android:title="@string/pref_download_path_setting_screen_title"/> - - <ListPreference - android:defaultValue="@string/pref_default_text_encoding_default" - android:dialogTitle="@string/pref_default_text_encoding_dialogtitle" - android:entries="@array/pref_default_text_encoding_choices" - android:entryValues="@array/pref_default_text_encoding_values" - android:key="default_text_encoding" - android:title="@string/pref_default_text_encoding" /> - - <CheckBoxPreference - android:key="load_images" - android:defaultValue="true" - android:title="@string/pref_content_load_images" - android:summary="@string/pref_content_load_images_summary" /> - - </PreferenceScreen> - - - <PreferenceScreen - android:key="website_settings" - android:summary="@string/pref_extras_website_settings_summary" - android:title="@string/pref_extras_website_settings" /> + android:summary="@string/pref_content_title_summary" + android:layout="@layout/swe_preference" + android:key="content_settings" /> <ListPreference + android:layout="@layout/swe_preference" + android:widgetLayout="@layout/swe_preference_list_widget" android:dialogTitle="@string/pref_edge_swipe_option_msg" android:entries="@array/pref_edge_swiping_choices" android:entryValues="@array/pref_edge_swiping_values" + android:summary="%s" android:key="edge_swiping_action" android:title="@string/pref_edge_swipe_title" /> <com.android.browser.BrowserYesNoPreference + android:layout="@layout/swe_preference" android:key="reset_default_preferences" android:title="@string/pref_extras_reset_default" android:summary="@string/pref_extras_reset_default_summary" @@ -221,6 +111,7 @@ android:dialogIcon="@android:drawable/ic_dialog_alert" /> <PreferenceScreen + android:layout="@layout/swe_preference" android:key="debug_menu" android:title="@string/pref_development_title" /> </PreferenceCategory> diff --git a/res/xml/privacy_and_security_preferences.xml b/res/xml/privacy_and_security_preferences.xml new file mode 100644 index 00000000..d5b2f9a1 --- /dev/null +++ b/res/xml/privacy_and_security_preferences.xml @@ -0,0 +1,184 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2015, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> + +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> + <PreferenceCategory + android:layout="@layout/swe_preference_category_first" + android:title="@string/pref_general_title"> + <com.android.browser.mdm.MdmCheckBoxPreference + android:layout="@layout/swe_preference" + android:defaultValue="true" + android:key="do_not_track" + android:summaryOn="@string/pref_security_protect" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_do_not_track" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="true" + android:key="remember_passwords" + android:summaryOn="@string/pref_security_remember" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_security_remember_passwords" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="true" + android:key="save_formdata" + android:summaryOn="@string/pref_security_remember" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_security_save_form_data" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="true" + android:key="accept_third_cookies" + android:summaryOn="@string/pref_security_allowed" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_security_accept_third_party_cookies" /> + + <PreferenceScreen android:title="@string/webstorage_private_data_title" + android:layout="@layout/swe_preference" + android:widgetLayout="@layout/swe_preference_storage_widget" + > + <CheckBoxPreference + android:defaultValue="true" + android:key="privacy_clear_history" + android:summary="@string/pref_privacy_clear_history_summary" + android:title="@string/pref_privacy_clear_history" /> + + <CheckBoxPreference + android:defaultValue="true" + android:key="privacy_clear_cache" + android:summary="@string/pref_privacy_clear_cache_summary" + android:title="@string/pref_privacy_clear_cache" /> + + <CheckBoxPreference + android:defaultValue="true" + android:key="privacy_clear_cookies" + android:summary="@string/pref_privacy_clear_cookies_summary" + android:title="@string/pref_privacy_clear_cookies" /> + + <CheckBoxPreference + android:defaultValue="true" + android:key="privacy_clear_form_data" + android:summary="@string/pref_privacy_clear_form_data_summary" + android:title="@string/pref_privacy_clear_form_data" /> + + <CheckBoxPreference + android:defaultValue="true" + android:key="privacy_clear_passwords" + android:summary="@string/pref_privacy_clear_passwords_summary" + android:title="@string/pref_privacy_clear_passwords" /> + + <CheckBoxPreference + android:defaultValue="true" + android:dependency="enable_geolocation" + android:key="privacy_clear_geolocation_access" + android:summary="@string/pref_privacy_clear_geolocation_access_summary" + android:title="@string/pref_privacy_clear_geolocation_access" /> + + <com.android.browser.BrowserYesNoPreference + android:layout="@layout/swe_preference_button" + android:dialogIcon="@android:drawable/ic_dialog_alert" + android:dialogMessage="@string/pref_privacy_clear_selected_dlg" + android:key="privacy_clear_selected" + android:summary="@string/pref_privacy_clear_selected_summary" + android:title="@string/pref_privacy_clear_selected" /> + + </PreferenceScreen> + + <PreferenceScreen + android:layout="@layout/swe_preference" + android:key="website_settings" + android:summary="@string/pref_extras_website_settings_summary" + android:title="@string/pref_extras_website_settings" /> + + </PreferenceCategory> + + <PreferenceCategory + android:layout="@layout/swe_preference_category" + android:title="@string/pref_default_site_settings_title"> + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="true" + android:icon="@drawable/ic_sp_location" + android:key="enable_geolocation" + android:summaryOn="@string/pref_security_ask_before_using" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_privacy_enable_geolocation" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="true" + android:icon="@drawable/ic_sp_microphone" + android:key="microphone" + android:summaryOn="@string/pref_security_ask_before_using" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_security_allow_mic" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="true" + android:icon="@drawable/ic_sp_camera" + android:key="camera" + android:summaryOn="@string/pref_security_ask_before_using" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_security_allow_camera" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="false" + android:icon="@drawable/ic_sp_webrefiner" + android:key="distracting_contents" + android:summaryOn="@string/pref_security_allowed" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_security_web_refiner" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="false" + android:icon="@drawable/ic_sp_popups" + android:key="popup_windows" + android:summaryOn="@string/pref_security_allowed" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_security_allow_popups" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="true" + android:icon="@drawable/ic_sp_thirdcookies" + android:key="accept_cookies" + android:summaryOn="@string/pref_security_allowed" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_security_accept_cookies" /> + + </PreferenceCategory> +</PreferenceScreen> diff --git a/res/xml/site_specific_preferences.xml b/res/xml/site_specific_preferences.xml new file mode 100644 index 00000000..19aac5cd --- /dev/null +++ b/res/xml/site_specific_preferences.xml @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2015, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> + +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" + android:key="site_specific_prefs"> + + <PreferenceCategory + android:layout="@layout/swe_preference_category_first" + android:title="@string/pref_website_title" > + <Preference + android:layout="@layout/swe_preference" + android:key="site_name"/> + </PreferenceCategory> + + <PreferenceCategory + android:layout="@layout/swe_preference_category" + android:key="site_security_info_title" + android:title="@string/pref_site_settings_info_panel" > + + <PreferenceScreen + android:key="site_security_info" + android:layout="@layout/site_specific_security_info"/> + </PreferenceCategory> + + <PreferenceCategory + android:title="@string/pref_site_settings_title" + android:layout="@layout/swe_preference_category" + android:key="reset_default"> + + <ListPreference + android:layout="@layout/swe_preference" + android:widgetLayout="@layout/swe_preference_list_widget" + android:icon="@drawable/ic_sp_location" + android:key="select_geolocation" + android:dialogTitle="@string/pref_privacy_clear_geolocation_access" + android:entries="@array/geolocation_settings_choices" + android:entryValues="@array/geolocation_settings_choices" + android:title="@string/pref_privacy_enable_geolocation" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="true" + android:icon="@drawable/ic_sp_microphone" + android:key="microphone" + android:summaryOn="@string/pref_security_allowed" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_security_allow_mic" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="true" + android:icon="@drawable/ic_sp_camera" + android:key="camera" + android:summaryOn="@string/pref_security_allowed" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_security_allow_camera" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="false" + android:icon="@drawable/ic_sp_webrefiner" + android:key="distracting_contents" + android:summaryOn="@string/pref_security_allowed" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_security_web_refiner" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="false" + android:icon="@drawable/ic_sp_popups" + android:key="popup_windows" + android:summaryOn="@string/pref_security_allowed" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_security_allow_popups" /> + + <SwitchPreference + android:layout="@layout/swe_preference" + android:defaultValue="true" + android:icon="@drawable/ic_sp_thirdcookies" + android:key="accept_cookies" + android:summaryOn="@string/pref_security_allowed" + android:summaryOff="@string/pref_security_not_allowed" + android:title="@string/pref_security_accept_cookies" /> + + <Preference + android:layout="@layout/swe_preference" + android:widgetLayout="@layout/swe_preference_trashcan_widget" + android:icon="@drawable/ic_sp_storage" + android:key="clear_data" + android:title="@string/webstorage_clear_data_title" /> + </PreferenceCategory> +</PreferenceScreen> |