<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2015 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"
                  xmlns:settings="http://schemas.android.com/apk/res-auto"
                  android:title="@string/development_settings_title">
    <com.android.tv.settings.widget.SwitchWithSoundPreference
        android:key="development_settings_enable"
        android:title="@string/development_settings_enable"
        android:fragment="com.android.tv.settings.system.development.EnableDevelopmentDialog"
    />
    <Preference
        android:key="bugreport"
        android:title="@*android:string/bugreport_title"
        android:dialogTitle="@*android:string/bugreport_title" />
    <PreferenceScreen
        android:key="local_backup_password"
        android:title="@string/local_backup_password_title"
        android:summary="@string/local_backup_password_summary_none"
        android:persistent="false" >
        <intent
            android:action="android.settings.privacy.SET_FULL_BACKUP_PASSWORD"
            android:targetPackage="com.android.settings"
            android:targetClass="com.android.settings.SetFullBackupPassword" />
    </PreferenceScreen>

    <com.android.tv.settings.widget.SwitchWithSoundPreference
        android:key="keep_screen_on"
        android:title="@string/keep_screen_on"
        android:summary="@string/keep_screen_on_summary"/>

    <ListPreference
        android:key="hdcp_checking"
        android:title="@string/hdcp_checking_title"
        android:dialogTitle="@string/hdcp_checking_dialog_title"
        android:entries="@array/hdcp_checking_titles"
        android:entryValues="@array/hdcp_checking_values" />

    <ListPreference
        android:key="bt_hci_snoop_log"
        android:title="@string/bt_hci_snoop_log"
        android:dialogTitle="@string/bt_hci_snoop_log_summary"
        android:entries="@array/bt_hci_snoop_log_entries"
        android:entryValues="@array/bt_hci_snoop_log_values" />

    <com.android.settingslib.RestrictedSwitchPreference
        android:key="oem_unlock_enable"
        android:title="@string/oem_unlock_enable"
        android:summary="@string/oem_unlock_enable_summary"
        android:fragment="com.android.tv.settings.system.development.OemUnlockDialog"
        settings:userRestriction="no_factory_reset"
        settings:useAdminDisabledSummary="true" />

    <PreferenceScreen
        android:key="running_apps"
        android:title="@string/runningservices_settings_title"
        android:summary="@string/runningservices_settings_summary" />
    <!-- TODO: implement this -->
    <!--android:fragment="com.android.settings.applications.RunningServices" />-->

    <com.android.tv.settings.system.development.ColorModePreference
        android:key="color_mode"
        android:title="@string/picture_color_mode"
        android:summary="@string/picture_color_mode_desc"
        android:persistent="true" />

    <PreferenceCategory android:key="debug_debugging_category"
                        android:title="@string/debug_debugging_category">

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="enable_adb"
            android:title="@string/enable_adb"
            android:summary="@string/enable_adb_summary"
            android:fragment="com.android.tv.settings.system.development.AdbDialog" />

        <Preference android:key="clear_adb_keys"
                    android:title="@string/clear_adb_keys"
                    android:fragment="com.android.tv.settings.system.development.AdbKeysDialog" />

        <Preference
            android:key="toggle_adb_wireless"
            android:title="@string/enable_adb_wireless"
            android:summary="@string/connectivity_summary_no_network_connected" />

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="enable_terminal"
            android:title="@string/enable_terminal_title"
            android:summary="@string/enable_terminal_summary" />

        <PreferenceScreen android:key="mock_location_app"
                          android:title="@string/mock_location_app" />

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="debug_view_attributes"
            android:title="@string/debug_view_attributes" />

        <PreferenceScreen android:key="debug_app"
                          android:title="@string/debug_app" />

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="wait_for_debugger"
            android:title="@string/wait_for_debugger"
            android:summary="@string/wait_for_debugger_summary"/>

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="verify_apps_over_usb"
            android:title="@string/verify_apps_over_usb_title"
            android:summary="@string/verify_apps_over_usb_summary"/>

        <ListPreference
            android:key="select_logd_size"
            android:title="@string/select_logd_size_title"
            android:dialogTitle="@string/select_logd_size_dialog_title"
            android:entries="@array/select_logd_size_titles"
            android:entryValues="@array/select_logd_size_values" />

        <ListPreference
            android:key="select_logpersist"
            android:title="@string/select_logpersist_title"
            android:dialogTitle="@string/select_logpersist_dialog_title"
            android:entries="@array/select_logpersist_titles"
            android:entryValues="@array/select_logpersist_values" />

    </PreferenceCategory>

    <PreferenceCategory android:key="debug_networking_category"
                        android:title="@string/debug_networking_category">

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="wifi_display_certification"
            android:title="@string/wifi_display_certification"
            android:summary="@string/wifi_display_certification_summary"/>

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="wifi_verbose_logging"
            android:title="@string/wifi_verbose_logging"
            android:summary="@string/wifi_verbose_logging_summary"/>

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="mobile_data_always_on"
            android:title="@string/mobile_data_always_on"
            android:summary="@string/mobile_data_always_on_summary"/>

        <ListPreference
            android:key="select_usb_configuration"
            android:title="@string/select_usb_configuration_title"
            android:dialogTitle="@string/select_usb_configuration_dialog_title"
            android:entries="@array/usb_configuration_titles"
            android:entryValues="@array/usb_configuration_values" />

    </PreferenceCategory>

    <PreferenceCategory android:key="debug_input_category"
                        android:title="@string/debug_input_category">

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="show_touches"
            android:title="@string/show_touches"
            android:summary="@string/show_touches_summary"/>

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="pointer_location"
            android:title="@string/pointer_location"
            android:summary="@string/pointer_location_summary"/>

    </PreferenceCategory>

    <PreferenceCategory android:key="debug_drawing_category"
                        android:title="@string/debug_drawing_category">

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="show_screen_updates"
            android:title="@string/show_screen_updates"
            android:summary="@string/show_screen_updates_summary"/>

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="debug_layout"
            android:title="@string/debug_layout"
            android:summary="@string/debug_layout_summary"/>

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="force_rtl_layout_all_locales"
            android:title="@string/force_rtl_layout_all_locales"
            android:summary="@string/force_rtl_layout_all_locales_summary"/>

        <ListPreference
            android:key="window_animation_scale"
            android:title="@string/window_animation_scale_title"
            android:persistent="true"
            android:entries="@array/window_animation_scale_entries"
            android:entryValues="@array/window_animation_scale_values" />

        <ListPreference
            android:key="transition_animation_scale"
            android:title="@string/transition_animation_scale_title"
            android:persistent="true"
            android:entries="@array/transition_animation_scale_entries"
            android:entryValues="@array/transition_animation_scale_values" />

        <ListPreference
            android:key="animator_duration_scale"
            android:title="@string/animator_duration_scale_title"
            android:persistent="true"
            android:entries="@array/animator_duration_scale_entries"
            android:entryValues="@array/animator_duration_scale_values" />

        <ListPreference
            android:key="overlay_display_devices"
            android:title="@string/overlay_display_devices_title"
            android:persistent="true"
            android:entries="@array/overlay_display_devices_entries"
            android:entryValues="@array/overlay_display_devices_values" />

    </PreferenceCategory>

    <PreferenceCategory android:key="debug_hw_drawing_category"
                        android:title="@string/debug_hw_drawing_category">
        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="show_hw_screen_udpates"
            android:title="@string/show_hw_screen_updates"
            android:summary="@string/show_hw_screen_updates_summary"/>

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="show_hw_layers_udpates"
            android:title="@string/show_hw_layers_updates"
            android:summary="@string/show_hw_layers_updates_summary"/>

        <ListPreference
            android:key="debug_hw_overdraw"
            android:title="@string/debug_hw_overdraw"
            android:persistent="true"
            android:entries="@array/debug_hw_overdraw_entries"
            android:entryValues="@array/debug_hw_overdraw_values" />

        <ListPreference
            android:key="show_non_rect_clip"
            android:title="@string/show_non_rect_clip"
            android:persistent="true"
            android:entries="@array/show_non_rect_clip_entries"
            android:entryValues="@array/show_non_rect_clip_values" />

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="window_blurs"
            android:title="@string/window_blurs"/>

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="force_msaa"
            android:title="@string/force_msaa"
            android:summary="@string/force_msaa_summary"/>

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="disable_overlays"
            android:title="@string/disable_overlays"
            android:summary="@string/disable_overlays_summary"/>

        <ListPreference
            android:entries="@array/simulate_color_space_entries"
            android:entryValues="@array/simulate_color_space_values"
            android:key="simulate_color_space"
            android:persistent="true"
            android:summary="%s"
            android:title="@string/simulate_color_space" />

    </PreferenceCategory>

    <PreferenceCategory android:key="media_category"
                        android:title="@string/media_category">

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="usb_audio"
            android:title="@string/usb_audio_disable_routing"
            android:summary="@string/usb_audio_disable_routing_summary" />

    </PreferenceCategory>

    <PreferenceCategory android:key="audio_category"
                        android:title="@string/audio_category">
        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="record_audio"
            android:title="@string/record_audio"
            android:summaryOn="@string/record_audio_summary_on"
            android:summaryOff="@string/record_audio_summary_off"/>
        <ListPreference
            android:key="record_audio_source"
            android:title="@string/record_audio_source_title"
            android:dialogTitle="@string/record_audio_source_dialog_title"
            android:summary="%s"
            android:defaultValue="0"
            android:entries="@array/record_audio_source_entries"
            android:entryValues="@array/record_audio_source_values" />
        <Preference
            android:key="play_recorded_audio"
            android:title="@string/play_recorded_audio_title"/>
        <Preference
            android:key="save_recorded_audio"
            android:title="@string/save_recorded_audio_title"/>
        <Preference
            android:key="time_to_start_read"
            android:title="@string/time_to_start_read_title"/>
        <Preference
            android:key="time_to_valid_audio"
            android:title="@string/time_to_valid_audio_title"/>
        <Preference
            android:key="empty_audio_duration"
            android:title="@string/empty_audio_duration_title"/>
    </PreferenceCategory>

    <PreferenceCategory android:key="debug_monitoring_category"
                        android:title="@string/debug_monitoring_category">

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="strict_mode"
            android:title="@string/strict_mode"
            android:summary="@string/strict_mode_summary"/>

        <ListPreference
            android:key="track_frame_time"
            android:title="@string/track_frame_time"
            android:persistent="true"
            android:entries="@array/track_frame_time_entries"
            android:entryValues="@array/track_frame_time_values" />

        <ListPreference
            android:key="enable_opengl_traces"
            android:title="@string/enable_opengl_traces_title"
            android:persistent="true"
            android:entries="@array/enable_opengl_traces_entries"
            android:entryValues="@array/enable_opengl_traces_values" />

    </PreferenceCategory>

    <PreferenceCategory android:key="debug_applications_category"
                        android:title="@string/debug_applications_category">

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="immediately_destroy_activities"
            android:title="@string/immediately_destroy_activities"
            android:summary="@string/immediately_destroy_activities_summary"/>

        <ListPreference
            android:key="app_process_limit"
            android:title="@string/app_process_limit_title"
            android:persistent="true"
            android:entries="@array/app_process_limit_entries"
            android:entryValues="@array/app_process_limit_values" />

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="show_all_anrs"
            android:title="@string/show_all_anrs"
            android:summary="@string/show_all_anrs_summary"/>

        <Preference
            android:key="inactive_apps"
            android:title="@string/inactive_apps_title"
            android:fragment="com.android.tv.settings.system.development.InactiveApps" />

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="force_allow_on_external"
            android:title="@string/force_allow_on_external"
            android:summary="@string/force_allow_on_external_summary"/>

        <com.android.tv.settings.widget.SwitchWithSoundPreference
            android:key="force_resizable_activities"
            android:title="@string/force_resizable_activities"
            android:summary="@string/force_resizable_activities_summary"/>
    </PreferenceCategory>

</PreferenceScreen>
