<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <!-- This preference links to the OS notification settings and only shows up on API >= 26 (Android 8) -->
    <PreferenceScreen
        android:icon="@drawable/ic_chat_24dp"
        android:key="message_notification_settings"
        android:summary="@string/pref_more_notification_settings_summary"
        android:title="@string/pref_message_notification_settings">
        <intent android:action="android.settings.CHANNEL_NOTIFICATION_SETTINGS">
            <extra
                android:name="android.provider.extra.APP_PACKAGE"
                android:value="@string/applicationId" />
            <extra
                android:name="android.provider.extra.CHANNEL_ID"
                android:value="messages" />
        </intent>
    </PreferenceScreen>

    <!-- The following settings show up on API < 26 ( Android 7.1 and below) -->
    <Preference
        android:defaultValue="@string/notification_ringtone"
        android:key="notification_ringtone"
        android:ringtoneType="notification"
        android:summary="@string/pref_notification_sound_summary"
        android:title="@string/pref_notification_sound" />
    <SwitchPreferenceCompat
        android:defaultValue="@bool/headsup_notifications"
        android:key="notification_headsup"
        android:summary="@string/pref_headsup_notifications_summary"
        android:title="@string/pref_headsup_notifications" />
    <SwitchPreferenceCompat
        android:defaultValue="@bool/vibrate_on_notification"
        android:key="vibrate_on_notification"
        android:summary="@string/pref_vibrate_summary"
        android:title="@string/pref_vibrate" />
    <SwitchPreferenceCompat
        android:defaultValue="@bool/led"
        android:key="led"
        android:summary="@string/pref_led_summary"
        android:title="@string/pref_led" />
    <Preference
        android:icon="@drawable/ic_phone_24dp"
        android:key="call_ringtone"
        android:ringtoneType="ringtone"
        android:summary="@string/pref_call_ringtone_summary"
        android:title="@string/pref_ringtone" />
    <SwitchPreferenceCompat
        android:icon="@drawable/ic_phone_in_talk_24dp"
        android:defaultValue="@bool/dialler_integration_incoming"
        android:key="dialler_integration_incoming"
        android:summary="@string/pref_dialler_integration_incoming_summary"
        android:title="@string/pref_dialler_integration_incoming" />
    <Preference
        android:icon="@drawable/ic_smartphone_24dp"
        android:key="fullscreen_notification"
        android:summary="@string/pref_fullscreen_notification_summary"
        android:title="@string/pref_fullscreen_notification" />
    <SwitchPreferenceCompat
        android:defaultValue="@bool/call_integration"
        android:icon="@drawable/ic_mobile_friendly_24dp"
        android:key="call_integration"
        android:summary="@string/pref_call_integration_summary"
        android:title="@string/pref_call_integration" />
    <ListPreference
        android:defaultValue="@integer/grace_period"
        android:entries="@array/grace_periods"
        android:entryValues="@array/grace_periods_values"
        android:icon="@drawable/ic_notifications_paused_24dp"
        android:key="grace_period_length"
        android:summary="@string/pref_notification_grace_period_summary"
        android:title="@string/pref_notification_grace_period" />
    <ListPreference
        android:defaultValue="@string/default_chat_requests"
        android:entries="@array/chat_requests_entries"
        android:entryValues="@array/chat_requests_values"
        android:icon="@drawable/ic_domino_mask_24dp"
        android:key="chat_requests"
        android:title="@string/pref_chat_requests"
        app:useSimpleSummaryProvider="true" />
    <SwitchPreferenceCompat
        android:icon="@drawable/ring_volume_24dp"
        android:defaultValue="@bool/notifications_from_strangers"
        android:key="ring_from_strangers"
        android:summary="@string/pref_ring_from_strangers_summary"
        android:title="@string/pref_ring_from_strangers" />

    <SwitchPreferenceCompat
        android:defaultValue="@bool/enable_foreground_service"
        android:icon="@drawable/ic_link_24dp"
        android:key="enable_foreground_service"
        android:summary="@string/pref_keep_foreground_service_summary"
        android:title="@string/pref_keep_foreground_service" />

</PreferenceScreen>
