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.settings.widget.SettingsMainSwitchPreference 29 android:key="block" 30 android:order="2" /> 31 32 <!-- Importance toggle --> 33 <com.android.settingslib.RestrictedSwitchPreference 34 android:key="allow_sound" 35 android:order="3" 36 android:title="@string/allow_interruption" 37 android:icon="@drawable/empty_icon" 38 android:summary="@string/allow_interruption_summary" /> 39 40 <!-- Importance --> 41 <com.android.settings.notification.app.ImportancePreference 42 android:key="importance" 43 android:order="4" 44 android:title="@string/notification_importance_title" /> 45 46 <com.android.settingslib.RestrictedSwitchPreference 47 android:key="min_importance" 48 android:order="5" 49 android:icon="@drawable/ic_notification_min" 50 android:title="@string/notification_importance_min_title" 51 android:summary="@string/notification_channel_summary_min"/> 52 53 <com.android.settingslib.RestrictedSwitchPreference 54 android:key="high_importance" 55 android:order="6" 56 android:icon="@drawable/ic_notification_peek" 57 android:title="@string/notification_importance_high_title" 58 android:summary="@string/notification_channel_summary_high"/> 59 60 <Preference 61 android:key="convo_promote" 62 android:order="7" 63 android:icon="@drawable/ic_promote_conversation" 64 android:title="@string/promote_conversation_title" 65 android:summary="@string/promote_conversation_summary" /> 66 67 <!-- Default ringtone --> 68 <com.android.settings.notification.app.NotificationSoundPreference 69 android:key="ringtone" 70 android:title="@string/notification_channel_sound_title" 71 android:dialogTitle="@string/notification_channel_sound_title" 72 android:icon="@drawable/ic_notifications" 73 android:order="11" 74 android:showSilent="true" 75 android:showDefault="true"/> 76 77 <!-- Vibration --> 78 <com.android.settingslib.RestrictedSwitchPreference 79 android:key="vibrate" 80 android:order="12" 81 android:icon="@drawable/ic_volume_ringer_vibrate" 82 android:title="@string/notification_vibrate_title" /> 83 84 <!-- Visibility Override --> 85 <com.android.settings.RestrictedListPreference 86 android:key="visibility_override" 87 android:order="13" 88 android:icon="@drawable/ic_notification_vis_override" 89 android:title="@string/app_notification_visibility_override_title"/> 90 91 <!-- Lights --> 92 <com.android.settingslib.RestrictedSwitchPreference 93 android:key="lights" 94 android:order="14" 95 android:icon="@drawable/ic_lightbulb_outline_24" 96 android:title="@string/notification_show_lights_title" /> 97 98 <!-- Show badge --> 99 <com.android.settingslib.RestrictedSwitchPreference 100 android:key="badge" 101 android:order="15" 102 android:title="@string/notification_channel_badge_title" 103 android:icon="@drawable/ic_notification_dot" 104 settings:restrictedSwitchSummary="@string/enabled_by_admin"/> 105 106 <!-- Bypass DND --> 107 <com.android.settingslib.RestrictedSwitchPreference 108 android:key="bypass_dnd" 109 android:order="17" 110 android:icon="@drawable/ic_do_not_disturb_on_24dp" 111 android:title="@string/app_notification_override_dnd_title" 112 android:summary="@string/app_notification_override_dnd_summary" /> 113 114 <Preference 115 android:key="app_link" 116 android:order="18" 117 android:title="@string/app_settings_link" 118 android:icon="@drawable/ic_settings_24dp" 119 settings:allowDividerAbove="true"/> 120 121 <com.android.settingslib.widget.FooterPreference 122 android:key="block_desc" 123 android:order="110" 124 settings:allowDividerAbove="false"/> 125 126</PreferenceScreen> 127