1<?xml version="1.0" encoding="utf-8"?>
2<!--
3     Copyright (C) 2014 The Android Open Source Project
4
5     Licensed under the Apache License, Version 2.0 (the "License");
6     you may not use this file except in compliance with the License.
7     You may obtain a copy of the License at
8
9          http://www.apache.org/licenses/LICENSE-2.0
10
11     Unless required by applicable law or agreed to in writing, software
12     distributed under the License is distributed on an "AS IS" BASIS,
13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14     See the License for the specific language governing permissions and
15     limitations under the License.
16-->
17
18<PreferenceScreen
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    xmlns:settings="http://schemas.android.com/apk/res-auto"
21    android:key="zen_mode_settings"
22    android:title="@string/zen_mode_settings_title"
23    settings:searchable="false">
24
25    <PreferenceCategory
26        android:key="zen_mode_settings_category_behavior"
27        android:title="@string/zen_category_behavior">
28        <!-- Calls -->
29        <Preference
30            android:key="zen_mode_behavior_calls"
31            android:title="@string/zen_mode_calls_title"
32            android:fragment="com.android.settings.notification.ZenModeCallsSettings" />
33
34        <!-- Messages -->
35        <Preference
36            android:key="zen_mode_behavior_messages"
37            android:title="@string/zen_mode_messages_title"
38            android:fragment="com.android.settings.notification.ZenModeMessagesSettings" />
39
40        <!-- All sounds -->
41        <Preference
42            android:key="zen_sound_vibration_settings"
43            android:title="@string/zen_sound_title"
44            android:fragment="com.android.settings.notification.ZenModeSoundVibrationSettings"
45            android:icon="@drawable/ic_chevron_right_24dp"/>
46    </PreferenceCategory>
47
48    <!-- What to block (effects) -->
49    <Preference
50        android:key="zen_mode_block_effects_settings"
51        android:title="@string/zen_mode_restrict_notifications_title"
52        android:fragment="com.android.settings.notification.ZenModeRestrictNotificationsSettings"
53        settings:allowDividerAbove="true"/>
54
55    <!-- DND duration settings -->
56    <com.android.settings.notification.ZenDurationDialogPreference
57        android:key="zen_mode_duration_settings"
58        android:title="@string/zen_mode_duration_settings_title"
59        android:widgetLayout="@null"/>
60
61    <!-- Automatic rules -->
62    <Preference
63        android:key="zen_mode_automation_settings"
64        android:title="@string/zen_mode_automation_settings_title"
65        android:fragment="com.android.settings.notification.ZenModeAutomationSettings"/>
66
67    <!-- Turn on DND button -->
68    <com.android.settingslib.widget.LayoutPreference
69        android:key="zen_mode_toggle"
70        android:title="@string/zen_mode_settings_title"
71        android:selectable="false"
72        android:layout="@layout/zen_mode_settings_button"
73        settings:allowDividerAbove="true"
74        settings:allowDividerBelow="true"
75        settings:keywords="@string/keywords_zen_mode_settings"/>
76
77    <!-- Footer that shows if user is put into alarms only or total silence mode by an app -->
78    <com.android.settingslib.widget.FooterPreference/>
79
80</PreferenceScreen>
81