Do not disturb settings page.
General section: Create switches for Phone calls & Messages. Contact filtering disabled for now. Automatic section: Add mode switching based on a simple overnight schedule. Bug:14211946 Change-Id: Ibb4e916cd5c9970f483858db91d6165507ceeb1a
This commit is contained in:
@@ -15,5 +15,6 @@
|
||||
-->
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="?android:attr/listSeparatorTextViewStyle"
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2014 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<ImageView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/configure_zen_mode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:padding="8dip"
|
||||
android:visibility="gone"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_bt_config"
|
||||
android:contentDescription="@string/configure_zen_mode_description" />
|
||||
@@ -83,4 +83,5 @@
|
||||
<dimen name="notification_app_icon_badge_size">20dp</dimen>
|
||||
<dimen name="notification_app_icon_badge_margin">4dp</dimen>
|
||||
<dimen name="notification_app_settings_divider_height">48dp</dimen>
|
||||
<dimen name="zen_mode_dropdown_width">160dp</dimen>
|
||||
</resources>
|
||||
|
||||
@@ -5089,4 +5089,52 @@
|
||||
|
||||
<!-- [CHAR LIMIT=20] Notification settings: App notifications dialog dismiss button caption -->
|
||||
<string name="app_notifications_dialog_done">Done</string>
|
||||
|
||||
<!-- [CHAR LIMIT=40] Zen mode settings: General category text -->
|
||||
<string name="zen_mode_general_category">When on, limit interruptions to</string>
|
||||
|
||||
<!-- [CHAR LIMIT=40] Zen mode settings: Automatic category text -->
|
||||
<string name="zen_mode_automatic_category">Automatically turn on for sleep</string>
|
||||
|
||||
<!-- [CHAR LIMIT=20] Zen mode settings: Phone calls option -->
|
||||
<string name="zen_mode_phone_calls">Phone calls</string>
|
||||
|
||||
<!-- [CHAR LIMIT=20] Zen mode settings: Messages option -->
|
||||
<string name="zen_mode_messages">Messages</string>
|
||||
|
||||
<!-- [CHAR LIMIT=20] Zen mode settings: From option -->
|
||||
<string name="zen_mode_from">From</string>
|
||||
|
||||
<!-- [CHAR LIMIT=30] Zen mode settings: From option value: Anyone -->
|
||||
<string name="zen_mode_from_anyone">Anyone</string>
|
||||
|
||||
<!-- [CHAR LIMIT=30] Zen mode settings: From option value: Contacts -->
|
||||
<string name="zen_mode_from_contacts">Contacts only</string>
|
||||
|
||||
<!-- [CHAR LIMIT=30] Zen mode settings: From option value: Starred contacts -->
|
||||
<string name="zen_mode_from_starred">Starred contacts only</string>
|
||||
|
||||
<!-- [CHAR LIMIT=60] Zen mode settings: Reminder text about alarms -->
|
||||
<string name="zen_mode_alarm_info">You’ll always hear alarms and timers in Do not disturb</string>
|
||||
|
||||
<!-- [CHAR LIMIT=20] Zen mode settings: When option -->
|
||||
<string name="zen_mode_when">When</string>
|
||||
|
||||
<!-- [CHAR LIMIT=20] Zen mode settings: When option value: Never -->
|
||||
<string name="zen_mode_when_never">Never</string>
|
||||
|
||||
<!-- [CHAR LIMIT=20] Zen mode settings: When option value: Every night -->
|
||||
<string name="zen_mode_when_every_night">Every night</string>
|
||||
|
||||
<!-- [CHAR LIMIT=20] Zen mode settings: When option value: Weeknights -->
|
||||
<string name="zen_mode_when_weeknights">Weeknights</string>
|
||||
|
||||
<!-- [CHAR LIMIT=20] Zen mode settings: Start time option -->
|
||||
<string name="zen_mode_start_time">Start time</string>
|
||||
|
||||
<!-- [CHAR LIMIT=20] Zen mode settings: End time option -->
|
||||
<string name="zen_mode_end_time">End time</string>
|
||||
|
||||
<!-- [CHAR LIMIT=20] Zen mode settings: End time option: Summary text value format -->
|
||||
<string name="zen_mode_end_time_summary_format"><xliff:g id="formatted_time">%s</xliff:g> next day</string>
|
||||
</resources>
|
||||
|
||||
44
res/xml/zen_mode_settings.xml
Normal file
44
res/xml/zen_mode_settings.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2014 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="zen_mode_settings"
|
||||
android:title="@string/zen_mode_settings_title" >
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="general"
|
||||
android:layout="@layout/notification_app_section"
|
||||
android:title="@string/zen_mode_general_category" >
|
||||
<SwitchPreference
|
||||
android:key="phone_calls"
|
||||
android:persistent="false"
|
||||
android:switchTextOff=""
|
||||
android:switchTextOn=""
|
||||
android:title="@string/zen_mode_phone_calls" />
|
||||
<SwitchPreference
|
||||
android:key="messages"
|
||||
android:persistent="false"
|
||||
android:switchTextOff=""
|
||||
android:switchTextOn=""
|
||||
android:title="@string/zen_mode_messages" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:key="automatic"
|
||||
android:layout="@layout/notification_app_section"
|
||||
android:title="@string/zen_mode_automatic_category" />
|
||||
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user