<?xml version="1.0" encoding="utf-8"?>
<!-- LINT.IfChange -->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto" >

    <PreferenceCategory
        android:key="general"
        android:title="General"
        app:iconSpaceReserved="false">
        <ListPreference
            android:key="@string/pref_device_profile"
            android:title="Device profile"
            android:entries="@array/device_profile_labels"
            android:entryValues="@array/device_profiles"
            android:defaultValue="@string/app_streaming"
            app:useSimpleSummaryProvider="true"
            app:iconSpaceReserved="false" />
        <SwitchPreferenceCompat
            android:key="@string/pref_hide_from_recents"
            android:title="Hide streamed app from recents"
            android:defaultValue="true"
            app:iconSpaceReserved="false"/>
        <SwitchPreferenceCompat
            android:key="@string/pref_enable_cross_device_clipboard"
            android:title="Enable cross-device clipboard"
            android:defaultValue="false"
            app:iconSpaceReserved="false"/>
        <SwitchPreferenceCompat
            android:key="@string/pref_enable_custom_activity_policy"
            android:title="Enable custom activity policy"
            android:summary="Show a custom notification when an activity could not be launched and try to send it to the default display"
            android:defaultValue="false"
            app:iconSpaceReserved="false"/>
        <SwitchPreferenceCompat
            android:key="@string/pref_enable_client_sensors"
            android:title="Enable client sensors"
            android:defaultValue="true"
            app:iconSpaceReserved="false" />
    </PreferenceCategory>

    <PreferenceCategory
        android:key="display"
        android:title="Displays"
        app:iconSpaceReserved="false">
        <SwitchPreferenceCompat
            android:key="@string/pref_enable_display_rotation"
            android:title="Enable display rotation"
            android:summary="Rotate the remote display instead of letterboxing or pillarboxing"
            android:defaultValue="true"
            app:iconSpaceReserved="false" />
        <SwitchPreferenceCompat
            android:key="@string/pref_enable_display_category"
            android:title="Enable display category"
            android:summary="Set a category for the remote display to restrict activity launches"
            android:defaultValue="true"
            app:iconSpaceReserved="false" />
        <SwitchPreferenceCompat
            android:key="@string/pref_public_displays"
            android:title="Public displays"
            android:defaultValue="true"
            app:iconSpaceReserved="false" />
        <SwitchPreferenceCompat
            android:key="@string/pref_always_unlocked_device"
            android:title="Always unlocked"
            android:summary="Remote displays remain unlocked even when the host is locked"
            android:defaultValue="true"
            app:iconSpaceReserved="false" />
        <SwitchPreferenceCompat
            android:key="@string/pref_show_pointer_icon"
            android:title="Show pointer icon"
            android:summary="Mouse pointer on remote displays is visible"
            android:defaultValue="false"
            app:iconSpaceReserved="false" />
        <SwitchPreferenceCompat
            android:key="@string/pref_enable_custom_home"
            android:title="Custom home"
            android:summary="Use a custom home activity instead of the default one on home displays"
            android:defaultValue="false"
            app:iconSpaceReserved="false" />
        <SwitchPreferenceCompat
            android:key="@string/pref_enable_custom_status_bar"
            android:title="Custom status bar"
            android:summary="Show a custom status bar on the remote displays."
            android:defaultValue="false"
            app:iconSpaceReserved="false" />
        <ListPreference
            android:key="@string/pref_display_timeout"
            android:title="Display timeout"
            android:entries="@array/display_timeout_labels"
            android:entryValues="@array/display_timeouts"
            android:defaultValue="0"
            app:useSimpleSummaryProvider="true"
            app:iconSpaceReserved="false" />
        <SwitchPreferenceCompat
            android:key="@string/pref_enable_client_brightness"
            android:title="Enable client brightness"
            android:summary="Propagate the virtual display brightness changes to the client display"
            android:defaultValue="false"
            app:iconSpaceReserved="false" />
        <SwitchPreferenceCompat
            android:key="@string/pref_custom_ui_mode"
            android:title="Custom UI mode"
            android:summary="Set APPLIANCE UI mode on the virtual displays. If unset, use the host's UI mode."
            android:defaultValue="false"
            app:iconSpaceReserved="false" />
        <ListPreference
            android:key="@string/pref_night_mode"
            android:title="Night mode"
            android:entries="@array/night_mode_labels"
            android:entryValues="@array/night_modes"
            android:defaultValue="@string/night_mode_undefined"
            app:useSimpleSummaryProvider="true"
            app:iconSpaceReserved="false" />
    </PreferenceCategory>

    <PreferenceCategory
        android:key="camera"
        android:title="Camera"
        app:iconSpaceReserved="false">
        <ListPreference
            android:key="@string/pref_camera_policy"
            android:title="Camera policy"
            android:entries="@array/camera_policy_labels"
            android:entryValues="@array/camera_policy_values"
            android:defaultValue="0"
            app:useSimpleSummaryProvider="true"
            app:iconSpaceReserved="false" />
        <SwitchPreferenceCompat
            android:key="@string/pref_duplicate_front_camera"
            android:title="Duplicate front camera"
            android:summary="Create an external camera duplicated from the client's front camera."
            android:defaultValue="false"
            app:iconSpaceReserved="false" />
        <SwitchPreferenceCompat
            android:key="@string/pref_duplicate_back_camera"
            android:title="Duplicate back camera"
            android:summary="Create an external camera duplicated from the client's back camera."
            android:defaultValue="false"
            app:iconSpaceReserved="false" />
    </PreferenceCategory>

    <PreferenceCategory
        android:key="audio"
        android:title="Audio"
        app:iconSpaceReserved="false">
    <SwitchPreferenceCompat
        android:key="@string/pref_enable_client_audio"
        android:title="Enable client audio"
        android:defaultValue="true"
        app:iconSpaceReserved="false" />
    <SwitchPreferenceCompat
        android:key="@string/pref_enable_update_audio_policy_mixes"
        android:dependency="@string/pref_enable_client_audio"
        android:title="Use AudioPolicy.updateMixingRules"
        android:summary="Updates the dynamic AudiPolicy mixing rules instead of unregistering and registering the AudioPolicy."
        android:defaultValue="true"
        app:iconSpaceReserved="false" />
    <SwitchPreferenceCompat
        android:key="@string/pref_use_legacy_playback_state"
        android:dependency="@string/pref_enable_client_audio"
        android:title="Use legacy playback state"
        android:summary="Listens to playback state changes for the uids associated with the virtual device to start and stop remote client audio playback."
        android:defaultValue="false"
        app:iconSpaceReserved="false" />
    </PreferenceCategory>

    <PreferenceCategory
        android:key="ime"
        android:title="Input Method"
        app:iconSpaceReserved="false">
        <ListPreference
            android:key="@string/pref_display_ime_policy"
            android:title="Display IME policy"
            android:entries="@array/display_ime_policy_labels"
            android:entryValues="@array/display_ime_policies"
            android:defaultValue="0"
            app:useSimpleSummaryProvider="true"
            app:iconSpaceReserved="false" />
        <SwitchPreferenceCompat
            android:key="@string/pref_enable_client_native_ime"
            android:title="Use the native client IME"
            android:summary="Use client's native IME instead of streaming one"
            android:defaultValue="false"
            app:iconSpaceReserved="false" />
    </PreferenceCategory>

    <PreferenceCategory
        android:key="debug"
        android:title="Debug"
        app:iconSpaceReserved="false">

        <SwitchPreferenceCompat
            android:key="@string/pref_standalone_host_demo"
            android:title="Single device demo"
            android:summary="Show the virtual displays on the host instead of a client device"
            android:defaultValue="false"
            app:iconSpaceReserved="false" />

        <!--
        When enabled, the encoder output of the host will be stored in:
        /sdcard/Download/vdmdemo_encoder_output_[displayId].h264

        After pulling this file to your machine this can be played back with:
        ffplay -f h264 vdmdemo_encoder_output_[displayId].h264
        -->
        <SwitchPreferenceCompat
            android:key="@string/pref_record_encoder_output"
            android:title="Record encoder output"
            android:summary="Store the host's media encoder output to a local file"
            android:defaultValue="false"
            app:iconSpaceReserved="false" />

        <ListPreference
            android:key="@string/pref_network_channel"
            android:title="Network channel"
            android:entries="@array/network_channels"
            android:entryValues="@array/network_channels"
            android:defaultValue="0"
            app:useSimpleSummaryProvider="true"
            app:iconSpaceReserved="false" />
    </PreferenceCategory>

</PreferenceScreen>
<!-- LINT.ThenChange(/samples/VirtualDeviceManager/README.md:host_options) -->
