1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2019 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<PreferenceScreen
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:settings="http://schemas.android.com/apk/res-auto"
20    android:key="channel_settings"
21    android:title="@string/notification_channel_title" >
22
23    <com.android.settingslib.widget.LayoutPreference
24        android:key="pref_app_header"
25        android:order="1"
26        android:layout="@layout/settings_entity_header" />
27
28    <!-- Importance toggle -->
29    <com.android.settingslib.RestrictedSwitchPreference
30        android:key="allow_sound"
31        android:order="3"
32        android:title="@string/allow_interruption"
33        android:summary="@string/allow_interruption_summary" />
34
35    <!-- Importance -->
36    <com.android.car.developeroptions.notification.ImportancePreference
37        android:key="importance"
38        android:order="4"
39        android:title="@string/notification_importance_title"
40        settings:allowDividerBelow="true"/>
41
42    <com.android.settingslib.RestrictedSwitchPreference
43        android:key="min_importance"
44        android:order="5"
45        settings:allowDividerAbove="true"
46        android:title="@string/notification_importance_min_title"/>
47
48    <com.android.settingslib.RestrictedSwitchPreference
49        android:key="high_importance"
50        android:order="6"
51        settings:allowDividerAbove="true"
52        android:title="@string/notification_importance_high_title"/>
53
54    <PreferenceCategory
55        android:key="channel_advanced"
56        android:order="50"
57        settings:initialExpandedChildrenCount="0">
58
59        <!-- Default ringtone -->
60        <com.android.car.developeroptions.notification.NotificationSoundPreference
61            android:key="ringtone"
62            android:title="@string/notification_channel_sound_title"
63            android:dialogTitle="@string/notification_channel_sound_title"
64            android:order="11"
65            android:showSilent="true"
66            android:showDefault="true"/>
67
68        <!-- Vibration -->
69        <com.android.settingslib.RestrictedSwitchPreference
70            android:key="vibrate"
71            android:order="12"
72            android:title="@string/notification_vibrate_title"
73            settings:useAdditionalSummary="true" />
74
75        <!-- Visibility Override -->
76        <com.android.car.developeroptions.RestrictedListPreference
77            android:key="visibility_override"
78            android:order="13"
79            android:title="@string/app_notification_visibility_override_title"/>
80
81        <!-- Lights -->
82        <com.android.settingslib.RestrictedSwitchPreference
83            android:key="lights"
84            android:order="14"
85            android:title="@string/notification_show_lights_title"
86            settings:useAdditionalSummary="true"/>
87
88        <!-- Show badge -->
89        <com.android.settingslib.RestrictedSwitchPreference
90            android:key="badge"
91            android:order="15"
92            android:title="@string/notification_channel_badge_title"
93            settings:useAdditionalSummary="true"
94            settings:restrictedSwitchSummary="@string/enabled_by_admin"/>
95
96        <com.android.settingslib.RestrictedSwitchPreference
97            android:key="bubble_pref"
98            android:title="@string/notification_bubbles_title"
99            android:order="16"
100            settings:restrictedSwitchSummary="@string/enabled_by_admin" />
101
102        <!-- Bypass DND -->
103        <com.android.settingslib.RestrictedSwitchPreference
104            android:key="bypass_dnd"
105            android:order="17"
106            android:title="@string/app_notification_override_dnd_title"
107            android:summary="@string/app_notification_override_dnd_summary"
108            settings:useAdditionalSummary="true"/>
109
110        <Preference
111            android:key="app_link"
112            android:order="18"
113            android:title="@string/app_settings_link"
114            settings:allowDividerAbove="true"/>
115    </PreferenceCategory>
116
117    <com.android.car.developeroptions.notification.NotificationFooterPreference
118        android:key="desc"
119        android:order="100"/>
120
121    <com.android.car.developeroptions.notification.NotificationFooterPreference
122        android:key="block_desc"
123        android:order="110"
124        settings:allowDividerAbove="false"/>
125
126</PreferenceScreen>
127