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.settings.applications.LayoutPreference 24 android:key="pref_app_header" 25 android:order="1" 26 android:layout="@layout/settings_entity_header" /> 27 28 <com.android.settings.applications.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.RestrictedListPreference 42 android:key="importance" 43 android:order="10" 44 android:title="@string/notification_importance_title" /> 45 46 <PreferenceCategory 47 android:key="channel_advanced" 48 android:order="50" 49 settings:initialExpandedChildrenCount="0"> 50 51 <!-- Default ringtone --> 52 <com.android.settings.notification.NotificationSoundPreference 53 android:key="ringtone" 54 android:title="@string/notification_channel_sound_title" 55 android:dialogTitle="@string/notification_channel_sound_title" 56 android:order="11" 57 android:showSilent="true" 58 android:showDefault="true" 59 android:ringtoneType="notification" /> 60 61 <!-- Vibration --> 62 <com.android.settingslib.RestrictedSwitchPreference 63 android:key="vibrate" 64 android:order="12" 65 android:title="@string/notification_vibrate_title" 66 settings:useAdditionalSummary="true" /> 67 68 <!-- Visibility Override --> 69 <com.android.settings.RestrictedListPreference 70 android:key="visibility_override" 71 android:order="13" 72 android:title="@string/app_notification_visibility_override_title"/> 73 74 <!-- Lights --> 75 <com.android.settingslib.RestrictedSwitchPreference 76 android:key="lights" 77 android:order="14" 78 android:title="@string/notification_show_lights_title" 79 settings:useAdditionalSummary="true"/> 80 81 <!-- Show badge --> 82 <com.android.settingslib.RestrictedSwitchPreference 83 android:key="badge" 84 android:order="15" 85 android:title="@string/notification_channel_badge_title" 86 settings:useAdditionalSummary="true" 87 settings:restrictedSwitchSummary="@string/enabled_by_admin"/> 88 89 <!-- Bypass DND --> 90 <com.android.settingslib.RestrictedSwitchPreference 91 android:key="bypass_dnd" 92 android:order="16" 93 android:title="@string/app_notification_override_dnd_title" 94 android:summary="@string/app_notification_override_dnd_summary" 95 settings:useAdditionalSummary="true"/> 96 97 <Preference 98 android:key="app_link" 99 android:order="17" 100 android:title="@string/app_settings_link" 101 settings:allowDividerAbove="true"/> 102 </PreferenceCategory> 103 104 <com.android.settings.notification.NotificationFooterPreference 105 android:key="desc" 106 android:order="100"/> 107 108 <com.android.settings.notification.NotificationFooterPreference 109 android:key="block_desc" 110 android:order="110"/> 111 112 </PreferenceScreen> 113