Broadscale logging for Settings

Bug: 26687914
Change-Id: Ida75ccf95376538e2ba95d212d333c40fd2dd6e0
This commit is contained in:
Jason Monk
2016-01-20 14:41:52 -05:00
parent 7368750b4f
commit 31c7c32fcc
38 changed files with 271 additions and 160 deletions

View File

@@ -27,7 +27,6 @@
android:entries="@array/daltonizer_type_entries" android:entries="@array/daltonizer_type_entries"
android:entryValues="@array/daltonizer_type_values" android:entryValues="@array/daltonizer_type_values"
android:key="type" android:key="type"
android:persistent="false"
android:summary="%s" android:summary="%s"
android:title="@string/daltonizer_type" /> android:title="@string/daltonizer_type" />

View File

@@ -55,8 +55,7 @@
<SwitchPreference <SwitchPreference
android:key="toggle_high_text_contrast_preference" android:key="toggle_high_text_contrast_preference"
android:title="@string/accessibility_toggle_high_text_contrast_preference_title" android:title="@string/accessibility_toggle_high_text_contrast_preference_title"
android:summary="@string/experimental_preference" android:summary="@string/experimental_preference"/>
android:persistent="false"/>
<SwitchPreference <SwitchPreference
android:key="toggle_power_button_ends_call_preference" android:key="toggle_power_button_ends_call_preference"

View File

@@ -54,6 +54,7 @@
android:title="@string/app_notification_block_title" android:title="@string/app_notification_block_title"
android:summary="@string/app_notification_block_summary" android:summary="@string/app_notification_block_summary"
android:order="7" /> android:order="7" />
<PreferenceCategory <PreferenceCategory
android:key="categories" android:key="categories"
android:title="@string/notification_topic_categories" android:title="@string/notification_topic_categories"

View File

@@ -51,14 +51,12 @@
android:key="toggle_advanced_settings" android:key="toggle_advanced_settings"
android:title="@string/advanced_settings" android:title="@string/advanced_settings"
android:summaryOff="@string/advanced_settings_summary" android:summaryOff="@string/advanced_settings_summary"
android:summaryOn="@string/advanced_settings_summary" android:summaryOn="@string/advanced_settings_summary" />
android:persistent="false" />
<ListPreference <ListPreference
android:key="app_install_location" android:key="app_install_location"
android:title="@string/app_install_location_title" android:title="@string/app_install_location_title"
android:summary="@string/app_install_location_summary" android:summary="@string/app_install_location_summary"
android:persistent="false"
android:entries="@array/app_install_location_entries" android:entries="@array/app_install_location_entries"
android:entryValues="@array/app_install_location_values"/> android:entryValues="@array/app_install_location_values"/>

View File

@@ -22,8 +22,7 @@
<DropDownPreference <DropDownPreference
android:key="turn_on_automatically" android:key="turn_on_automatically"
android:title="@string/battery_saver_turn_on_automatically_title" android:title="@string/battery_saver_turn_on_automatically_title"
android:summary="%s" android:summary="%s" />
android:persistent="false" />
<!-- Feature description text --> <!-- Feature description text -->
<com.android.settings.fuelgauge.WallOfTextPreference <com.android.settings.fuelgauge.WallOfTextPreference

View File

@@ -26,7 +26,6 @@
android:title="@string/captioning_standard_options_title" > android:title="@string/captioning_standard_options_title" >
<com.android.settings.accessibility.LocalePreference <com.android.settings.accessibility.LocalePreference
android:key="captioning_locale" android:key="captioning_locale"
android:persistent="false"
android:summary="%s" android:summary="%s"
android:title="@string/captioning_locale" /> android:title="@string/captioning_locale" />
@@ -34,13 +33,11 @@
android:entries="@array/captioning_font_size_selector_titles" android:entries="@array/captioning_font_size_selector_titles"
android:entryValues="@array/captioning_font_size_selector_values" android:entryValues="@array/captioning_font_size_selector_values"
android:key="captioning_font_size" android:key="captioning_font_size"
android:persistent="false"
android:summary="%s" android:summary="%s"
android:title="@string/captioning_text_size" /> android:title="@string/captioning_text_size" />
<com.android.settings.accessibility.PresetPreference <com.android.settings.accessibility.PresetPreference
android:key="captioning_preset" android:key="captioning_preset"
android:persistent="false"
android:title="@string/captioning_preset" /> android:title="@string/captioning_preset" />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory
@@ -50,47 +47,38 @@
android:entries="@array/captioning_typeface_selector_titles" android:entries="@array/captioning_typeface_selector_titles"
android:entryValues="@array/captioning_typeface_selector_values" android:entryValues="@array/captioning_typeface_selector_values"
android:key="captioning_typeface" android:key="captioning_typeface"
android:persistent="false"
android:summary="%s" android:summary="%s"
android:title="@string/captioning_typeface" /> android:title="@string/captioning_typeface" />
<com.android.settings.accessibility.ColorPreference <com.android.settings.accessibility.ColorPreference
android:key="captioning_foreground_color" android:key="captioning_foreground_color"
android:persistent="false"
android:title="@string/captioning_foreground_color" /> android:title="@string/captioning_foreground_color" />
<com.android.settings.accessibility.ColorPreference <com.android.settings.accessibility.ColorPreference
android:dependency="captioning_foreground_color" android:dependency="captioning_foreground_color"
android:key="captioning_foreground_opacity" android:key="captioning_foreground_opacity"
android:persistent="false"
android:title="@string/captioning_foreground_opacity" /> android:title="@string/captioning_foreground_opacity" />
<com.android.settings.accessibility.EdgeTypePreference <com.android.settings.accessibility.EdgeTypePreference
android:key="captioning_edge_type" android:key="captioning_edge_type"
android:persistent="false"
android:title="@string/captioning_edge_type" /> android:title="@string/captioning_edge_type" />
<com.android.settings.accessibility.ColorPreference <com.android.settings.accessibility.ColorPreference
android:dependency="captioning_edge_type" android:dependency="captioning_edge_type"
android:key="captioning_edge_color" android:key="captioning_edge_color"
android:persistent="false"
android:title="@string/captioning_edge_color" /> android:title="@string/captioning_edge_color" />
<com.android.settings.accessibility.ColorPreference <com.android.settings.accessibility.ColorPreference
android:key="captioning_background_color" android:key="captioning_background_color"
android:persistent="false"
android:title="@string/captioning_background_color" /> android:title="@string/captioning_background_color" />
<com.android.settings.accessibility.ColorPreference <com.android.settings.accessibility.ColorPreference
android:dependency="captioning_background_color" android:dependency="captioning_background_color"
android:key="captioning_background_opacity" android:key="captioning_background_opacity"
android:persistent="false"
android:title="@string/captioning_background_opacity" /> android:title="@string/captioning_background_opacity" />
<com.android.settings.accessibility.ColorPreference <com.android.settings.accessibility.ColorPreference
android:key="captioning_window_color" android:key="captioning_window_color"
android:persistent="false"
android:title="@string/captioning_window_color" /> android:title="@string/captioning_window_color" />
<com.android.settings.accessibility.ColorPreference <com.android.settings.accessibility.ColorPreference
android:dependency="captioning_window_color" android:dependency="captioning_window_color"
android:key="captioning_window_opacity" android:key="captioning_window_opacity"
android:persistent="false"
android:title="@string/captioning_window_opacity" /> android:title="@string/captioning_window_opacity" />
</PreferenceCategory> </PreferenceCategory>

View File

@@ -22,15 +22,13 @@
<!-- Pulse notification light --> <!-- Pulse notification light -->
<SwitchPreference <SwitchPreference
android:key="notification_pulse" android:key="notification_pulse"
android:title="@string/notification_pulse_title" android:title="@string/notification_pulse_title" />
android:persistent="false" />
<!-- When device is locked --> <!-- When device is locked -->
<com.android.settingslib.RestrictedDropDownPreference <com.android.settingslib.RestrictedDropDownPreference
android:key="lock_screen_notifications" android:key="lock_screen_notifications"
android:title="@string/lock_screen_notifications_title" android:title="@string/lock_screen_notifications_title"
android:summary="%s" android:summary="%s" />
android:persistent="false" />
<PreferenceCategory <PreferenceCategory
android:key="advanced" android:key="advanced"

View File

@@ -64,7 +64,6 @@
android:key="night_mode" android:key="night_mode"
android:title="@string/night_mode_title" android:title="@string/night_mode_title"
android:summary="%s" android:summary="%s"
android:persistent="false"
android:entries="@array/night_mode_entries" android:entries="@array/night_mode_entries"
android:entryValues="@array/night_mode_values" /> android:entryValues="@array/night_mode_values" />
@@ -77,8 +76,7 @@
<com.android.settings.ColorModePreference <com.android.settings.ColorModePreference
android:key="color_mode" android:key="color_mode"
android:title="@string/picture_color_mode" android:title="@string/picture_color_mode"
android:summary="@string/picture_color_mode_desc" android:summary="@string/picture_color_mode_desc" />
android:persistent="false" />
<ListPreference <ListPreference
android:key="select_webview_provider" android:key="select_webview_provider"
@@ -89,8 +87,7 @@
<SwitchPreference <SwitchPreference
android:key="color_temperature" android:key="color_temperature"
android:title="@string/color_temperature" android:title="@string/color_temperature"
android:summary="@string/color_temperature_desc" android:summary="@string/color_temperature_desc" />
android:persistent="false" />
<PreferenceCategory android:key="debug_debugging_category" <PreferenceCategory android:key="debug_debugging_category"
android:title="@string/debug_debugging_category"> android:title="@string/debug_debugging_category">
@@ -220,28 +217,24 @@
<ListPreference <ListPreference
android:key="window_animation_scale" android:key="window_animation_scale"
android:title="@string/window_animation_scale_title" android:title="@string/window_animation_scale_title"
android:persistent="false"
android:entries="@array/window_animation_scale_entries" android:entries="@array/window_animation_scale_entries"
android:entryValues="@array/window_animation_scale_values" /> android:entryValues="@array/window_animation_scale_values" />
<ListPreference <ListPreference
android:key="transition_animation_scale" android:key="transition_animation_scale"
android:title="@string/transition_animation_scale_title" android:title="@string/transition_animation_scale_title"
android:persistent="false"
android:entries="@array/transition_animation_scale_entries" android:entries="@array/transition_animation_scale_entries"
android:entryValues="@array/transition_animation_scale_values" /> android:entryValues="@array/transition_animation_scale_values" />
<ListPreference <ListPreference
android:key="animator_duration_scale" android:key="animator_duration_scale"
android:title="@string/animator_duration_scale_title" android:title="@string/animator_duration_scale_title"
android:persistent="false"
android:entries="@array/animator_duration_scale_entries" android:entries="@array/animator_duration_scale_entries"
android:entryValues="@array/animator_duration_scale_values" /> android:entryValues="@array/animator_duration_scale_values" />
<ListPreference <ListPreference
android:key="overlay_display_devices" android:key="overlay_display_devices"
android:title="@string/overlay_display_devices_title" android:title="@string/overlay_display_devices_title"
android:persistent="false"
android:entries="@array/overlay_display_devices_entries" android:entries="@array/overlay_display_devices_entries"
android:entryValues="@array/overlay_display_devices_values" /> android:entryValues="@array/overlay_display_devices_values" />
@@ -268,14 +261,12 @@
<ListPreference <ListPreference
android:key="debug_hw_overdraw" android:key="debug_hw_overdraw"
android:title="@string/debug_hw_overdraw" android:title="@string/debug_hw_overdraw"
android:persistent="false"
android:entries="@array/debug_hw_overdraw_entries" android:entries="@array/debug_hw_overdraw_entries"
android:entryValues="@array/debug_hw_overdraw_values" /> android:entryValues="@array/debug_hw_overdraw_values" />
<ListPreference <ListPreference
android:key="show_non_rect_clip" android:key="show_non_rect_clip"
android:title="@string/show_non_rect_clip" android:title="@string/show_non_rect_clip"
android:persistent="false"
android:entries="@array/show_non_rect_clip_entries" android:entries="@array/show_non_rect_clip_entries"
android:entryValues="@array/show_non_rect_clip_values" /> android:entryValues="@array/show_non_rect_clip_values" />
@@ -293,7 +284,6 @@
android:entries="@array/simulate_color_space_entries" android:entries="@array/simulate_color_space_entries"
android:entryValues="@array/simulate_color_space_values" android:entryValues="@array/simulate_color_space_values"
android:key="simulate_color_space" android:key="simulate_color_space"
android:persistent="false"
android:summary="%s" android:summary="%s"
android:title="@string/simulate_color_space" /> android:title="@string/simulate_color_space" />
@@ -325,14 +315,12 @@
<ListPreference <ListPreference
android:key="track_frame_time" android:key="track_frame_time"
android:title="@string/track_frame_time" android:title="@string/track_frame_time"
android:persistent="false"
android:entries="@array/track_frame_time_entries" android:entries="@array/track_frame_time_entries"
android:entryValues="@array/track_frame_time_values" /> android:entryValues="@array/track_frame_time_values" />
<ListPreference <ListPreference
android:key="enable_opengl_traces" android:key="enable_opengl_traces"
android:title="@string/enable_opengl_traces_title" android:title="@string/enable_opengl_traces_title"
android:persistent="false"
android:entries="@array/enable_opengl_traces_entries" android:entries="@array/enable_opengl_traces_entries"
android:entryValues="@array/enable_opengl_traces_values" /> android:entryValues="@array/enable_opengl_traces_values" />
@@ -349,7 +337,6 @@
<ListPreference <ListPreference
android:key="app_process_limit" android:key="app_process_limit"
android:title="@string/app_process_limit_title" android:title="@string/app_process_limit_title"
android:persistent="false"
android:entries="@array/app_process_limit_entries" android:entries="@array/app_process_limit_entries"
android:entryValues="@array/app_process_limit_values" /> android:entryValues="@array/app_process_limit_values" />

View File

@@ -30,8 +30,7 @@
android:key="auto_brightness" android:key="auto_brightness"
android:title="@string/auto_brightness_title" android:title="@string/auto_brightness_title"
settings:keywords="@string/keywords_display_auto_brightness" settings:keywords="@string/keywords_display_auto_brightness"
android:summary="@string/auto_brightness_summary" android:summary="@string/auto_brightness_summary" />
android:persistent="false" />
<!-- Hide night mode for now <!-- Hide night mode for now
<ListPreference <ListPreference
@@ -39,7 +38,6 @@
android:title="@string/night_mode_title" android:title="@string/night_mode_title"
settings:keywords="@string/keywords_display_night_mode" settings:keywords="@string/keywords_display_night_mode"
android:summary="@string/night_mode_summary" android:summary="@string/night_mode_summary"
android:persistent="false"
android:entries="@array/night_mode_entries" android:entries="@array/night_mode_entries"
android:entryValues="@array/night_mode_values" /> --> android:entryValues="@array/night_mode_values" /> -->
@@ -53,21 +51,18 @@
android:key="screen_timeout" android:key="screen_timeout"
android:title="@string/screen_timeout" android:title="@string/screen_timeout"
android:summary="@string/screen_timeout_summary" android:summary="@string/screen_timeout_summary"
android:persistent="false"
android:entries="@array/screen_timeout_entries" android:entries="@array/screen_timeout_entries"
android:entryValues="@array/screen_timeout_values" /> android:entryValues="@array/screen_timeout_values" />
<SwitchPreference <SwitchPreference
android:key="camera_gesture" android:key="camera_gesture"
android:title="@string/camera_gesture_title" android:title="@string/camera_gesture_title"
android:summary="@string/camera_gesture_desc" android:summary="@string/camera_gesture_desc" />
android:persistent="false" />
<SwitchPreference <SwitchPreference
android:key="camera_double_tap_power_gesture" android:key="camera_double_tap_power_gesture"
android:title="@string/camera_double_tap_power_gesture_title" android:title="@string/camera_double_tap_power_gesture_title"
android:summary="@string/camera_double_tap_power_gesture_desc" android:summary="@string/camera_double_tap_power_gesture_desc" />
android:persistent="false" />
<PreferenceScreen <PreferenceScreen
android:key="screensaver" android:key="screensaver"
@@ -76,20 +71,17 @@
<SwitchPreference <SwitchPreference
android:key="lift_to_wake" android:key="lift_to_wake"
android:title="@string/lift_to_wake_title" android:title="@string/lift_to_wake_title" />
android:persistent="false" />
<SwitchPreference <SwitchPreference
android:key="doze" android:key="doze"
android:title="@string/doze_title" android:title="@string/doze_title"
android:summary="@string/doze_summary" android:summary="@string/doze_summary" />
android:persistent="false" />
<SwitchPreference <SwitchPreference
android:key="tap_to_wake" android:key="tap_to_wake"
android:title="@string/tap_to_wake" android:title="@string/tap_to_wake"
android:summary="@string/tap_to_wake_summary" android:summary="@string/tap_to_wake_summary" />
android:persistent="false" />
<PreferenceScreen <PreferenceScreen
android:key="font_size" android:key="font_size"
@@ -104,7 +96,6 @@
<DropDownPreference <DropDownPreference
android:key="auto_rotate" android:key="auto_rotate"
android:persistent="false"
android:summary="%s" android:summary="%s"
android:title="@string/display_auto_rotate_title" /> android:title="@string/display_auto_rotate_title" />

View File

@@ -22,14 +22,12 @@
<DropDownPreference <DropDownPreference
android:key="app_link_state" android:key="app_link_state"
android:persistent="false"
android:summary="%s" android:summary="%s"
android:title="@string/app_launch_open_domain_urls_title" /> android:title="@string/app_launch_open_domain_urls_title" />
<com.android.settings.applications.AppDomainsPreference <com.android.settings.applications.AppDomainsPreference
android:key="app_launch_supported_domain_urls" android:key="app_launch_supported_domain_urls"
android:title="@string/app_launch_supported_domain_urls_title" android:title="@string/app_launch_supported_domain_urls_title"
android:persistent="false"
android:dependency="app_link_state" android:dependency="app_link_state"
/> />
@@ -40,7 +38,6 @@
<com.android.settings.applications.ClearDefaultsPreference <com.android.settings.applications.ClearDefaultsPreference
android:key="app_launch_clear_defaults" android:key="app_launch_clear_defaults"
android:persistent="false"
/> />
</PreferenceCategory> </PreferenceCategory>

View File

@@ -103,7 +103,6 @@
android:title="@string/vibrate_input_devices" android:title="@string/vibrate_input_devices"
android:summaryOn="@string/vibrate_input_devices_summary" android:summaryOn="@string/vibrate_input_devices_summary"
android:summaryOff="@string/vibrate_input_devices_summary" android:summaryOff="@string/vibrate_input_devices_summary"
android:persistent="false"
/> />
</PreferenceCategory> </PreferenceCategory>

View File

@@ -20,17 +20,14 @@
<com.android.settings.location.RadioButtonPreference <com.android.settings.location.RadioButtonPreference
android:key="high_accuracy" android:key="high_accuracy"
android:title="@string/location_mode_high_accuracy_title" android:title="@string/location_mode_high_accuracy_title"
android:summary="@string/location_mode_high_accuracy_description" android:summary="@string/location_mode_high_accuracy_description" />
android:persistent="false" />
<com.android.settings.location.RadioButtonPreference <com.android.settings.location.RadioButtonPreference
android:key="battery_saving" android:key="battery_saving"
android:title="@string/location_mode_battery_saving_title" android:title="@string/location_mode_battery_saving_title"
android:summary="@string/location_mode_battery_saving_description" android:summary="@string/location_mode_battery_saving_description" />
android:persistent="false" />
<com.android.settings.location.RadioButtonPreference <com.android.settings.location.RadioButtonPreference
android:key="sensors_only" android:key="sensors_only"
android:title="@string/location_mode_sensors_only_title" android:title="@string/location_mode_sensors_only_title"
android:summary="@string/location_mode_sensors_only_description" android:summary="@string/location_mode_sensors_only_description" />
android:persistent="false" />
</PreferenceScreen> </PreferenceScreen>

View File

@@ -21,14 +21,12 @@
android:title="@string/location_scanning_wifi_always_scanning_title" android:title="@string/location_scanning_wifi_always_scanning_title"
android:summary="@string/location_scanning_wifi_always_scanning_description" android:summary="@string/location_scanning_wifi_always_scanning_description"
android:defaultValue="true" android:defaultValue="true"
android:key="wifi_always_scanning" android:key="wifi_always_scanning" />
android:persistent="false" />
<SwitchPreference <SwitchPreference
android:title="@string/location_scanning_bluetooth_always_scanning_title" android:title="@string/location_scanning_bluetooth_always_scanning_title"
android:summary="@string/location_scanning_bluetooth_always_scanning_description" android:summary="@string/location_scanning_bluetooth_always_scanning_description"
android:defaultValue="true" android:defaultValue="true"
android:key="bluetooth_always_scanning" android:key="bluetooth_always_scanning" />
android:persistent="false" />
</PreferenceScreen> </PreferenceScreen>

View File

@@ -31,7 +31,6 @@
android:key="managed_profile_location_switch" android:key="managed_profile_location_switch"
android:title="@string/managed_profile_location_switch_title" android:title="@string/managed_profile_location_switch_title"
settings:useAdminDisabledSummary="true" settings:useAdminDisabledSummary="true"
android:persistent="false"
android:enabled="false" android:enabled="false"
android:selectable="true" /> android:selectable="true" />

View File

@@ -28,14 +28,12 @@
<SwitchPreference <SwitchPreference
android:key="context" android:key="context"
android:title="@string/assist_access_context_title" android:title="@string/assist_access_context_title"
android:summary="@string/assist_access_context_summary" android:summary="@string/assist_access_context_summary"/>
android:persistent="false"/>
<SwitchPreference <SwitchPreference
android:key="screenshot" android:key="screenshot"
android:title="@string/assist_access_screenshot_title" android:title="@string/assist_access_screenshot_title"
android:summary="@string/assist_access_screenshot_summary" android:summary="@string/assist_access_screenshot_summary"/>
android:persistent="false"/>
<com.android.settings.voice.VoiceInputListPreference <com.android.settings.voice.VoiceInputListPreference
android:key="voice_input_settings" android:key="voice_input_settings"

View File

@@ -22,51 +22,43 @@
<!-- Dial pad tones --> <!-- Dial pad tones -->
<SwitchPreference <SwitchPreference
android:key="dial_pad_tones" android:key="dial_pad_tones"
android:title="@string/dial_pad_tones_title" android:title="@string/dial_pad_tones_title" />
android:persistent="false" />
<!-- Screen locking sounds --> <!-- Screen locking sounds -->
<SwitchPreference <SwitchPreference
android:key="screen_locking_sounds" android:key="screen_locking_sounds"
android:title="@string/screen_locking_sounds_title" android:title="@string/screen_locking_sounds_title" />
android:persistent="false" />
<!-- Charging sounds --> <!-- Charging sounds -->
<SwitchPreference <SwitchPreference
android:key="charging_sounds" android:key="charging_sounds"
android:title="@string/charging_sounds_title" android:title="@string/charging_sounds_title" />
android:persistent="false" />
<!-- Docking sounds --> <!-- Docking sounds -->
<SwitchPreference <SwitchPreference
android:key="docking_sounds" android:key="docking_sounds"
android:title="@string/docking_sounds_title" android:title="@string/docking_sounds_title" />
android:persistent="false" />
<!-- Touch sounds --> <!-- Touch sounds -->
<SwitchPreference <SwitchPreference
android:key="touch_sounds" android:key="touch_sounds"
android:title="@string/touch_sounds_title" android:title="@string/touch_sounds_title" />
android:persistent="false" />
<!-- Vibrate on touch --> <!-- Vibrate on touch -->
<SwitchPreference <SwitchPreference
android:key="vibrate_on_touch" android:key="vibrate_on_touch"
android:title="@string/vibrate_on_touch_title" android:title="@string/vibrate_on_touch_title" />
android:persistent="false" />
<!-- Dock speaker plays --> <!-- Dock speaker plays -->
<DropDownPreference <DropDownPreference
android:key="dock_audio_media" android:key="dock_audio_media"
android:title="@string/dock_audio_media_title" android:title="@string/dock_audio_media_title"
android:summary="%s" android:summary="%s" />
android:persistent="false" />
<!-- Emergency tone --> <!-- Emergency tone -->
<DropDownPreference <DropDownPreference
android:key="emergency_tone" android:key="emergency_tone"
android:title="@string/emergency_tone_title" android:title="@string/emergency_tone_title"
android:summary="%s" android:summary="%s" />
android:persistent="false" />
</PreferenceScreen> </PreferenceScreen>

View File

@@ -41,8 +41,7 @@
<SwitchPreference <SwitchPreference
android:key="auto_restore" android:key="auto_restore"
android:title="@string/auto_restore_title" android:title="@string/auto_restore_title"
android:summary="@string/auto_restore_summary" android:summary="@string/auto_restore_summary" />
android:persistent="false" />
<Preference <Preference
android:key="backup_inactive" android:key="backup_inactive"

View File

@@ -19,7 +19,6 @@
<SwitchPreference <SwitchPreference
android:key="use_screen_lock" android:key="use_screen_lock"
android:title="@string/screen_pinning_unlock_none" android:title="@string/screen_pinning_unlock_none" />
android:persistent="false" />
</PreferenceScreen> </PreferenceScreen>

View File

@@ -37,8 +37,7 @@
android:persistent="false"> android:persistent="false">
<SwitchPreference android:key="show_password" <SwitchPreference android:key="show_password"
android:title="@string/show_password" android:title="@string/show_password"/>
android:persistent="false"/>
</PreferenceCategory> </PreferenceCategory>
@@ -55,8 +54,7 @@
<com.android.settingslib.RestrictedSwitchPreference android:key="toggle_install_applications" <com.android.settingslib.RestrictedSwitchPreference android:key="toggle_install_applications"
android:title="@string/install_applications" android:title="@string/install_applications"
android:summaryOff="@string/install_unknown_applications" android:summaryOff="@string/install_unknown_applications"
android:summaryOn="@string/install_unknown_applications" android:summaryOn="@string/install_unknown_applications" />
android:persistent="false" />
</PreferenceCategory> </PreferenceCategory>

View File

@@ -26,8 +26,7 @@
android:key="unlock_set_or_change" android:key="unlock_set_or_change"
android:title="@string/unlock_set_unlock_launch_picker_title" android:title="@string/unlock_set_unlock_launch_picker_title"
android:summary="@string/unlock_set_unlock_mode_password" android:summary="@string/unlock_set_unlock_mode_password"
settings:keywords="@string/keywords_lockscreen" settings:keywords="@string/keywords_lockscreen" />
android:persistent="false"/>
</PreferenceCategory> </PreferenceCategory>

View File

@@ -26,8 +26,7 @@
android:key="unlock_set_or_change" android:key="unlock_set_or_change"
android:title="@string/unlock_set_unlock_launch_picker_title" android:title="@string/unlock_set_unlock_launch_picker_title"
android:summary="@string/unlock_set_unlock_mode_pattern" android:summary="@string/unlock_set_unlock_mode_pattern"
settings:keywords="@string/keywords_lockscreen" settings:keywords="@string/keywords_lockscreen" />
android:persistent="false"/>
</PreferenceCategory> </PreferenceCategory>

View File

@@ -26,8 +26,7 @@
android:key="unlock_set_or_change" android:key="unlock_set_or_change"
android:title="@string/unlock_set_unlock_launch_picker_title" android:title="@string/unlock_set_unlock_launch_picker_title"
android:summary="@string/unlock_set_unlock_mode_pin" android:summary="@string/unlock_set_unlock_mode_pin"
settings:keywords="@string/keywords_lockscreen" settings:keywords="@string/keywords_lockscreen" />
android:persistent="false"/>
</PreferenceCategory> </PreferenceCategory>

View File

@@ -21,7 +21,6 @@
<SwitchPreference <SwitchPreference
android:key="sim_toggle" android:key="sim_toggle"
android:title="@string/sim_pin_toggle" android:title="@string/sim_pin_toggle"
android:persistent="false"
android:summaryOn="@string/sim_lock_on" android:summaryOn="@string/sim_lock_on"
android:summaryOff="@string/sim_lock_off"/> android:summaryOff="@string/sim_lock_off"/>
@@ -31,7 +30,6 @@
android:title="@string/sim_pin_change" android:title="@string/sim_pin_change"
android:dialogTitle="@string/sim_change_pin" android:dialogTitle="@string/sim_change_pin"
android:dialogMessage="@string/sim_enter_old" android:dialogMessage="@string/sim_enter_old"
android:persistent="false"
android:positiveButtonText="@string/sim_enter_ok" android:positiveButtonText="@string/sim_enter_ok"
android:negativeButtonText="@string/sim_enter_cancel"/> android:negativeButtonText="@string/sim_enter_cancel"/>

View File

@@ -47,14 +47,12 @@
<!-- Also vibrate for calls --> <!-- Also vibrate for calls -->
<SwitchPreference <SwitchPreference
android:key="vibrate_when_ringing" android:key="vibrate_when_ringing"
android:title="@string/vibrate_when_ringing_title" android:title="@string/vibrate_when_ringing_title" />
android:persistent="false" />
<!-- Master mono --> <!-- Master mono -->
<SwitchPreference <SwitchPreference
android:key="master_mono" android:key="master_mono"
android:title="@string/master_mono_title" android:title="@string/master_mono_title"
android:persistent="false"
android:summaryOn="@string/master_mono_on" android:summaryOn="@string/master_mono_on"
android:summaryOff="@string/master_mono_off" /> android:summaryOff="@string/master_mono_off" />
@@ -71,7 +69,6 @@
android:key="ringtone" android:key="ringtone"
android:title="@string/ringtone_title" android:title="@string/ringtone_title"
android:dialogTitle="@string/ringtone_title" android:dialogTitle="@string/ringtone_title"
android:persistent="false"
android:ringtoneType="ringtone" /> android:ringtoneType="ringtone" />
<!-- Default notification ringtone --> <!-- Default notification ringtone -->
@@ -79,7 +76,6 @@
android:key="notification_ringtone" android:key="notification_ringtone"
android:title="@string/notification_ringtone_title" android:title="@string/notification_ringtone_title"
android:dialogTitle="@string/notification_ringtone_title" android:dialogTitle="@string/notification_ringtone_title"
android:persistent="false"
android:ringtoneType="notification" /> android:ringtoneType="notification" />
<!-- Default alarm ringtone --> <!-- Default alarm ringtone -->

View File

@@ -18,13 +18,11 @@
<SwitchPreference <SwitchPreference
android:key="usb_tether_settings" android:key="usb_tether_settings"
android:title="@string/usb_tethering_button_text" android:title="@string/usb_tethering_button_text" />
android:persistent="false" />
<SwitchPreference <SwitchPreference
android:key="enable_wifi_ap" android:key="enable_wifi_ap"
android:title="@string/wifi_tether_checkbox_text" android:title="@string/wifi_tether_checkbox_text" />
android:persistent="false" />
<Preference <Preference
android:key="wifi_ap_ssid_and_security" android:key="wifi_ap_ssid_and_security"
@@ -33,7 +31,6 @@
<SwitchPreference <SwitchPreference
android:key="enable_bluetooth_tethering" android:key="enable_bluetooth_tethering"
android:title="@string/bluetooth_tether_checkbox_text" android:title="@string/bluetooth_tether_checkbox_text" />
android:persistent="false" />
</PreferenceScreen> </PreferenceScreen>

View File

@@ -19,7 +19,6 @@
android:key="tts_default_lang" android:key="tts_default_lang"
android:title="@string/tts_default_lang_title" android:title="@string/tts_default_lang_title"
android:summary="@string/tts_default_lang_summary" android:summary="@string/tts_default_lang_summary"
android:persistent="false"
android:order="100" /> android:order="100" />
<Preference <Preference

View File

@@ -28,7 +28,6 @@
android:key="tts_default_rate" android:key="tts_default_rate"
android:title="@string/tts_default_rate_title" android:title="@string/tts_default_rate_title"
android:summary="@string/tts_default_rate_summary" android:summary="@string/tts_default_rate_summary"
android:persistent="false"
android:defaultValue="50" android:defaultValue="50"
android:max="400" /> android:max="400" />
<SwitchPreference <SwitchPreference

View File

@@ -19,11 +19,10 @@
<SwitchPreference <SwitchPreference
android:key="enable_calling" android:key="enable_calling"
android:title="@string/user_enable_calling_sms" android:title="@string/user_enable_calling_sms" />
android:persistent="false" />
<com.android.settingslib.RestrictedPreference <com.android.settingslib.RestrictedPreference
android:key="remove_user" android:key="remove_user"
android:title="@string/user_remove_user" android:title="@string/user_remove_user"
settings:useAdminDisabledSummary="true" /> settings:useAdminDisabledSummary="true" />
</PreferenceScreen> </PreferenceScreen>

View File

@@ -26,13 +26,11 @@
<SwitchPreference <SwitchPreference
android:key="notify_open_networks" android:key="notify_open_networks"
android:title="@string/wifi_notify_open_networks" android:title="@string/wifi_notify_open_networks"
android:summary="@string/wifi_notify_open_networks_summary" android:summary="@string/wifi_notify_open_networks_summary" />
android:persistent="false" />
<ListPreference <ListPreference
android:key="sleep_policy" android:key="sleep_policy"
android:title="@string/wifi_setting_sleep_policy_title" android:title="@string/wifi_setting_sleep_policy_title"
android:persistent="false"
android:entries="@array/wifi_sleep_policy_entries" android:entries="@array/wifi_sleep_policy_entries"
android:entryValues="@array/wifi_sleep_policy_values" /> android:entryValues="@array/wifi_sleep_policy_values" />
@@ -40,14 +38,12 @@
android:key="wifi_assistant" android:key="wifi_assistant"
android:title="@string/wifi_automatically_connect_title" android:title="@string/wifi_automatically_connect_title"
android:summary="@string/wifi_automatically_connect_summary" android:summary="@string/wifi_automatically_connect_summary"
android:dialogTitle="@string/wifi_select_assistant_dialog_title" android:dialogTitle="@string/wifi_select_assistant_dialog_title" />
android:persistent="false" />
<ListPreference <ListPreference
android:key="frequency_band" android:key="frequency_band"
android:title="@string/wifi_setting_frequency_band_title" android:title="@string/wifi_setting_frequency_band_title"
android:summary="@string/wifi_setting_frequency_band_summary" android:summary="@string/wifi_setting_frequency_band_summary"
android:persistent="false"
android:entries="@array/wifi_frequency_band_entries" android:entries="@array/wifi_frequency_band_entries"
android:entryValues="@array/wifi_frequency_band_values" /> android:entryValues="@array/wifi_frequency_band_values" />

View File

@@ -21,14 +21,12 @@
<SwitchPreference <SwitchPreference
android:key="toggle_airplane" android:key="toggle_airplane"
android:title="@string/airplane_mode" android:title="@string/airplane_mode"
android:persistent="false"
android:disableDependentsState="true" /> android:disableDependentsState="true" />
<SwitchPreference <SwitchPreference
android:key="toggle_nfc" android:key="toggle_nfc"
android:title="@string/nfc_quick_toggle_title" android:title="@string/nfc_quick_toggle_title"
android:summary="@string/nfc_quick_toggle_summary" android:summary="@string/nfc_quick_toggle_summary" />
android:persistent="false" />
<PreferenceScreen <PreferenceScreen
android:key="wifi_calling_settings" android:key="wifi_calling_settings"

View File

@@ -28,21 +28,18 @@
<DropDownPreference <DropDownPreference
android:key="calendar" android:key="calendar"
android:title="@string/zen_mode_event_rule_calendar" android:title="@string/zen_mode_event_rule_calendar"
android:summary="%s" android:summary="%s" />
android:persistent="false" />
<!-- Where reply is --> <!-- Where reply is -->
<DropDownPreference <DropDownPreference
android:key="reply" android:key="reply"
android:title="@string/zen_mode_event_rule_reply" android:title="@string/zen_mode_event_rule_reply"
android:summary="%s" android:summary="%s" />
android:persistent="false" />
<!-- Zen mode --> <!-- Zen mode -->
<DropDownPreference <DropDownPreference
android:key="zen_mode" android:key="zen_mode"
android:title="@string/zen_mode_settings_title" android:title="@string/zen_mode_settings_title"
android:summary="%s" android:summary="%s" />
android:persistent="false" />
</PreferenceScreen> </PreferenceScreen>

View File

@@ -40,7 +40,6 @@
<DropDownPreference <DropDownPreference
android:key="zen_mode" android:key="zen_mode"
android:summary="%s" android:summary="%s"
android:title="@string/zen_mode_settings_title" android:title="@string/zen_mode_settings_title" />
android:persistent="false" />
</PreferenceScreen> </PreferenceScreen>

View File

@@ -24,39 +24,33 @@
android:key="alarms" android:key="alarms"
android:title="@string/zen_mode_alarms" android:title="@string/zen_mode_alarms"
android:enabled="false" android:enabled="false"
android:defaultValue="true" android:defaultValue="true"/>
android:persistent="false"/>
<!-- Reminders --> <!-- Reminders -->
<SwitchPreference <SwitchPreference
android:key="reminders" android:key="reminders"
android:title="@string/zen_mode_reminders" android:title="@string/zen_mode_reminders"/>
android:persistent="false"/>
<!-- Events --> <!-- Events -->
<SwitchPreference <SwitchPreference
android:key="events" android:key="events"
android:title="@string/zen_mode_events" android:title="@string/zen_mode_events"/>
android:persistent="false"/>
<!-- Messages --> <!-- Messages -->
<DropDownPreference <DropDownPreference
android:key="messages" android:key="messages"
android:title="@string/zen_mode_messages" android:title="@string/zen_mode_messages"
android:summary="%s" android:summary="%s" />
android:persistent="false" />
<!-- Calls --> <!-- Calls -->
<DropDownPreference <DropDownPreference
android:key="calls" android:key="calls"
android:title="@string/zen_mode_calls" android:title="@string/zen_mode_calls"
android:summary="%s" android:summary="%s" />
android:persistent="false" />
<!-- Repeat callers --> <!-- Repeat callers -->
<SwitchPreference <SwitchPreference
android:key="repeat_callers" android:key="repeat_callers"
android:title="@string/zen_mode_repeat_callers" android:title="@string/zen_mode_repeat_callers"/>
android:persistent="false"/>
</PreferenceScreen> </PreferenceScreen>

View File

@@ -37,7 +37,6 @@
android:key="zen_mode" android:key="zen_mode"
android:title="@string/zen_mode_settings_title" android:title="@string/zen_mode_settings_title"
android:order="100" android:order="100"
android:summary="%s" android:summary="%s" />
android:persistent="false" />
</PreferenceScreen> </PreferenceScreen>

View File

@@ -20,17 +20,14 @@
<SwitchPreference android:key="peek" <SwitchPreference android:key="peek"
android:title="@string/zen_mode_peek" android:title="@string/zen_mode_peek"
android:summary="@string/zen_mode_peek_summary" android:summary="@string/zen_mode_peek_summary" />
android:persistent="false" />
<SwitchPreference android:key="lights" <SwitchPreference android:key="lights"
android:title="@string/zen_mode_lights" android:title="@string/zen_mode_lights"
android:summary="@string/zen_mode_lights_summary" android:summary="@string/zen_mode_lights_summary" />
android:persistent="false" />
<SwitchPreference android:key="screen_on" <SwitchPreference android:key="screen_on"
android:title="@string/zen_mode_screen_on" android:title="@string/zen_mode_screen_on"
android:summary="@string/zen_mode_screen_on_summary" android:summary="@string/zen_mode_screen_on_summary" />
android:persistent="false" />
</PreferenceScreen> </PreferenceScreen>

View File

@@ -16,11 +16,11 @@
package com.android.settings; package com.android.settings;
import com.android.internal.logging.MetricsLogger;
import android.os.Bundle; import android.os.Bundle;
import android.support.v14.preference.PreferenceFragment; import android.support.v14.preference.PreferenceFragment;
import com.android.internal.logging.MetricsLogger;
/** /**
* Instrumented fragment that logs visibility state. * Instrumented fragment that logs visibility state.
*/ */
@@ -44,6 +44,10 @@ public abstract class InstrumentedFragment extends PreferenceFragment {
public static final int DATA_SAVER_SUMMARY = UNDECLARED + 14; public static final int DATA_SAVER_SUMMARY = UNDECLARED + 14;
public static final int DATA_USAGE_UNRESTRICTED_ACCESS = UNDECLARED + 15; public static final int DATA_USAGE_UNRESTRICTED_ACCESS = UNDECLARED + 15;
// Used for generic logging of Settings Preference Persistence, should not be used
// outside SharedPreferencesLogger.
public static final int ACTION_GENERIC_PACKAGE = UNDECLARED + 16;
/** /**
* Declare the view of this category. * Declare the view of this category.
* *

View File

@@ -457,6 +457,21 @@ public class SettingsActivity extends SettingsDrawerActivity
return true; return true;
} }
@Override
public SharedPreferences getSharedPreferences(String name, int mode) {
if (name.equals(getPackageName() + "_preferences")) {
String tag = getClass().getName();
if (getIntent() != null && getIntent().hasExtra(EXTRA_SHOW_FRAGMENT)) {
tag = getIntent().getStringExtra(EXTRA_SHOW_FRAGMENT);
}
if (tag.startsWith("com.android.settings.")) {
tag = tag.replace("com.android.settings.", "");
}
return new SharedPreferencesLogger(this, tag);
}
return super.getSharedPreferences(name, mode);
}
private static boolean isShortCutIntent(final Intent intent) { private static boolean isShortCutIntent(final Intent intent) {
Set<String> categories = intent.getCategories(); Set<String> categories = intent.getCategories();
return (categories != null) && categories.contains("com.android.settings.SHORTCUT"); return (categories != null) && categories.contains("com.android.settings.SHORTCUT");

View File

@@ -0,0 +1,191 @@
/*
* Copyright (C) 2016 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.
*/
package com.android.settings;
import com.android.internal.logging.MetricsLogger;
import android.annotation.Nullable;
import android.content.ComponentName;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.os.AsyncTask;
import android.text.TextUtils;
import android.util.Log;
import java.util.Map;
import java.util.Set;
public class SharedPreferencesLogger implements SharedPreferences {
private final String mTag;
private final Context mContext;
public SharedPreferencesLogger(Context context, String tag) {
mContext = context;
mTag = tag;
}
@Override
public Map<String, ?> getAll() {
return null;
}
@Override
public String getString(String key, @Nullable String defValue) {
return defValue;
}
@Override
public Set<String> getStringSet(String key, @Nullable Set<String> defValues) {
return defValues;
}
@Override
public int getInt(String key, int defValue) {
return defValue;
}
@Override
public long getLong(String key, long defValue) {
return defValue;
}
@Override
public float getFloat(String key, float defValue) {
return defValue;
}
@Override
public boolean getBoolean(String key, boolean defValue) {
return defValue;
}
@Override
public boolean contains(String key) {
return false;
}
@Override
public Editor edit() {
return new EditorLogger();
}
@Override
public void registerOnSharedPreferenceChangeListener(
OnSharedPreferenceChangeListener listener) {
}
@Override
public void unregisterOnSharedPreferenceChangeListener(
OnSharedPreferenceChangeListener listener) {
}
private void logValue(String key, String value) {
MetricsLogger.histogram(mContext, mTag + "/" + key + "|" + value, 1);
}
private void logPackageName(String key, String value) {
MetricsLogger.histogram(mContext, mTag + "/" + key, 1);
MetricsLogger.action(mContext, InstrumentedFragment.ACTION_GENERIC_PACKAGE,
mTag + "/" + key + "|" + value);
}
private void safeLogValue(String key, String value) {
new AsyncPackageCheck().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, key, value);
}
private class AsyncPackageCheck extends AsyncTask<String, Void, Void> {
@Override
protected Void doInBackground(String... params) {
String key = params[0];
String value = params[1];
PackageManager pm = mContext.getPackageManager();
try {
// Check if this might be a component.
ComponentName name = ComponentName.unflattenFromString(value);
if (value != null) {
value = name.getPackageName();
}
} catch (Exception e) {
}
try {
pm.getPackageInfo(value, PackageManager.MATCH_UNINSTALLED_PACKAGES);
logPackageName(key, value);
} catch (PackageManager.NameNotFoundException e) {
// Clearly not a package, lets log it.
logValue(key, value);
}
return null;
}
}
public class EditorLogger implements Editor {
@Override
public Editor putString(String key, @Nullable String value) {
safeLogValue(key, value);
return this;
}
@Override
public Editor putStringSet(String key, @Nullable Set<String> values) {
safeLogValue(key, TextUtils.join(",", values));
return this;
}
@Override
public Editor putInt(String key, int value) {
logValue(key, String.valueOf(value));
return this;
}
@Override
public Editor putLong(String key, long value) {
logValue(key, String.valueOf(value));
return this;
}
@Override
public Editor putFloat(String key, float value) {
logValue(key, String.valueOf(value));
return this;
}
@Override
public Editor putBoolean(String key, boolean value) {
logValue(key, String.valueOf(value));
return this;
}
@Override
public Editor remove(String key) {
return this;
}
@Override
public Editor clear() {
return this;
}
@Override
public boolean commit() {
return true;
}
@Override
public void apply() {
}
}
}