1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2016 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 <com.android.settingslib.widget.LayoutPreference 29 android:key="block" 30 android:order="2" 31 android:layout="@layout/styled_switch_bar" /> 32 33 <!-- Importance toggle --> 34 <com.android.settingslib.RestrictedSwitchPreference 35 android:key="allow_sound" 36 android:order="3" 37 android:title="@string/allow_interruption" 38 android:summary="@string/allow_interruption_summary" /> 39 40 <!-- Importance --> 41 <com.android.settings.notification.ImportancePreference 42 android:key="importance" 43 android:order="4" 44 android:title="@string/notification_importance_title" 45 settings:allowDividerBelow="true"/> 46 47 <com.android.settingslib.RestrictedSwitchPreference 48 android:key="min_importance" 49 android:order="5" 50 settings:allowDividerAbove="true" 51 android:title="@string/notification_importance_min_title" 52 android:summary="@string/notification_channel_summary_min"/> 53 54 <com.android.settingslib.RestrictedSwitchPreference 55 android:key="high_importance" 56 android:order="6" 57 settings:allowDividerAbove="true" 58 android:title="@string/notification_importance_high_title" 59 android:summary="@string/notification_channel_summary_high"/> 60 61 <PreferenceCategory 62 android:key="channel_advanced" 63 android:order="50" 64 settings:initialExpandedChildrenCount="0"> 65 66 <!-- Default ringtone --> 67 <com.android.settings.notification.NotificationSoundPreference 68 android:key="ringtone" 69 android:title="@string/notification_channel_sound_title" 70 android:dialogTitle="@string/notification_channel_sound_title" 71 android:order="11" 72 android:showSilent="true" 73 android:showDefault="true"/> 74 75 <!-- Vibration --> 76 <com.android.settingslib.RestrictedSwitchPreference 77 android:key="vibrate" 78 android:order="12" 79 android:title="@string/notification_vibrate_title" 80 settings:useAdditionalSummary="true" /> 81 82 <!-- Visibility Override --> 83 <com.android.settings.RestrictedListPreference 84 android:key="visibility_override" 85 android:order="13" 86 android:title="@string/app_notification_visibility_override_title"/> 87 88 <!-- Lights --> 89 <com.android.settingslib.RestrictedSwitchPreference 90 android:key="lights" 91 android:order="14" 92 android:title="@string/notification_show_lights_title" 93 settings:useAdditionalSummary="true"/> 94 95 <!-- Show badge --> 96 <com.android.settingslib.RestrictedSwitchPreference 97 android:key="badge" 98 android:order="15" 99 android:title="@string/notification_channel_badge_title" 100 settings:useAdditionalSummary="true" 101 settings:restrictedSwitchSummary="@string/enabled_by_admin"/> 102 103 <com.android.settingslib.RestrictedSwitchPreference 104 android:key="bubble_pref" 105 android:title="@string/notification_bubbles_title" 106 android:order="16" 107 settings:restrictedSwitchSummary="@string/enabled_by_admin" /> 108 109 <!-- Bypass DND --> 110 <com.android.settingslib.RestrictedSwitchPreference 111 android:key="bypass_dnd" 112 android:order="17" 113 android:title="@string/app_notification_override_dnd_title" 114 android:summary="@string/app_notification_override_dnd_summary" 115 settings:useAdditionalSummary="true"/> 116 117 <Preference 118 android:key="app_link" 119 android:order="18" 120 android:title="@string/app_settings_link" 121 settings:allowDividerAbove="true"/> 122 </PreferenceCategory> 123 124 <com.android.settings.notification.NotificationFooterPreference 125 android:key="desc" 126 android:order="100"/> 127 128 <com.android.settings.notification.NotificationFooterPreference 129 android:key="block_desc" 130 android:order="110" 131 settings:allowDividerAbove="false"/> 132 133</PreferenceScreen> 134