Add activities to support voice settings.
Adds Voice Interaction Activities for:
- Do not disturb mode (with interaction)
- Battery Saver mode
- Airplane mode
Change-Id: I4480dc3a30975d94b71714ff58fbeebddfbc1c58
diff --git a/res/drawable/bg_circle_blue.xml b/res/drawable/bg_circle_blue.xml
new file mode 100644
index 0000000..7f2cb1d
--- /dev/null
+++ b/res/drawable/bg_circle_blue.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 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.
+ -->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="oval">
+ <solid android:color="@color/blue" />
+</shape>
diff --git a/res/layout/voice_interaction.xml b/res/layout/voice_interaction.xml
new file mode 100644
index 0000000..13c4341
--- /dev/null
+++ b/res/layout/voice_interaction.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 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.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/fragment_root"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+</FrameLayout>
diff --git a/res/layout/voice_item_row.xml b/res/layout/voice_item_row.xml
new file mode 100644
index 0000000..8576a57
--- /dev/null
+++ b/res/layout/voice_item_row.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
+ <LinearLayout
+ android:id="@+id/row_one"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentStart="true"
+ android:layout_marginTop="20dp"
+ android:layout_marginBottom="20dp">
+
+ <TextView
+ android:layout_width="0px"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:id="@+id/voice_item_label" />
+
+ <TextView
+ android:layout_width="100px"
+ android:layout_height="100px"
+ android:gravity="center_horizontal|center_vertical"
+ android:background="@drawable/bg_circle_blue"
+ android:textAppearance="?android:attr/textAppearanceMediumInverse"
+ android:textStyle="bold"
+ android:id="@+id/voice_item_position" />
+ </LinearLayout>
+</LinearLayout>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 97ba2ed..6e97a2a 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -17,6 +17,7 @@
<resources>
<color name="black">#000</color>
<color name="red">#F00</color>
+ <color name="blue">#00F</color>
<color name="material_empty_color_light">#FFCED7DB</color>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index cc01c45..133f6f5 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -5989,6 +5989,93 @@
<!-- [CHAR LIMIT=60] Zen mode settings: End time option: Summary text value format when end time = next day -->
<string name="zen_mode_end_time_next_day_summary_format"><xliff:g id="formatted_time">%s</xliff:g> next day</string>
+ <!-- [CHAR LIMIT=NONE] Zen mode voice: Prompt read for interruption type -->
+ <string name="zen_mode_interruptions_voice_prompt">When would you like to be interrupted?</string>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice: Prompt read for zen mode duration -->
+ <string name="zen_mode_duration_voice_prompt">For how long?</string>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice: Comma delimited synonyms for important interriuptions -->
+ <string name="zen_mode_option_important_voice_synonyms">important,priority,priority notifications</string>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice: Comma delimited synonyms for alarm interriuptions -->
+ <string name="zen_mode_option_alarms_voice_synonyms">alarms</string>
+
+ <!-- [CHAR LIMIT=60] Zen mode voice: Off [CHAR LIMIT=60] -->
+ <string name="zen_mode_option_off">Off</string>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice: Comma delimited synonyms for off interriuptions -->
+ <string name="zen_mode_option_off_voice_synonyms">off,all,everything</string>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice: Comma delimited synonyms for no interriuptions -->
+ <string name="zen_mode_option_no_interruptions_voice_synonyms">none,nothing,no interruptions</string>
+
+ <!-- [CHAR LIMIT=40] Zen mode voice: Label for indefinite mode duration -->
+ <string name="zen_mode_duration_indefinte_voice_label">Indefinitely</string>
+
+ <!-- [CHAR LIMIT=40] Zen mode voice: Label for duration in minutes -->
+ <plurals name="zen_mode_duration_minutes_voice_label">
+ <item quantity="one"><xliff:g id="count" example="1">%d</xliff:g> minute</item>
+ <item quantity="other"><xliff:g id="count" example="10">%d</xliff:g> minutes</item>
+ </plurals>
+
+ <!-- [CHAR LIMIT=40] Zen mode voice: Label for duration in hours -->
+ <plurals name="zen_mode_duration_hours_voice_label">
+ <item quantity="one"><xliff:g id="count" example="1">%d</xliff:g> hour</item>
+ <item quantity="other"><xliff:g id="count" example="10">%d</xliff:g> hours</item>
+ </plurals>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice - spoken summary: important only duration indefinite. -->
+ <string name="zen_mode_summary_priority_indefinitely">Change to priority notifications only indefinitely</string>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice- spoken summary: important only duration minutes. -->
+ <plurals name="zen_mode_summary_priority_by_minute">
+ <item quantity="one">Change to priority notifications only for one minute until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g></item>
+ <item quantity="other">Change to priority notifications only for <xliff:g id="duration" example="2">%1$d</xliff:g> minutes until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g></item>
+ </plurals>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice- spoken summary: important only duration hours. -->
+ <plurals name="zen_mode_summary_priority_by_hour">
+ <item quantity="one">Change to priority notifications only for one hour until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g></item>
+ <item quantity="other">Change to priority notifications only for <xliff:g id="duration" example="2">%1$d</xliff:g> hours (until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g>)</item>
+ </plurals>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice - spoken summary: alarms only duration indefinite. -->
+ <string name="zen_mode_summary_alarams_only_indefinite">Change to alarms only indefinitely</string>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice- spoken summary: alarms only duration minutes. -->
+ <plurals name="zen_mode_summary_alarms_only_by_minute">
+ <item quantity="one">Change to alarms only for one minute until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g></item>
+ <item quantity="other">Change to alarms only for <xliff:g id="duration" example="2">%1$d</xliff:g> minutes (until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g>)</item>
+ </plurals>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice- spoken summary: alarms only duration hours. -->
+ <plurals name="zen_mode_summary_alarms_only_by_hour">
+ <item quantity="one">Change to alarms only for one hour until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g></item>
+ <item quantity="other">Change to alarms only for <xliff:g id="duration" example="2">%1$d</xliff:g> hours until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g></item>
+ </plurals>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice - spoken summary: no interruptions duration indefinite. -->
+ <string name="zen_mode_summary_no_interruptions_indefinite">Change to don\'t interrupt indefinitely</string>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice- spoken summary: alarms only duration minutes. -->
+ <plurals name="zen_mode_summary_no_interruptions_by_minute">
+ <item quantity="one">Change to don\'t interrupt for one minute until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g></item>
+ <item quantity="other">Change to don\'t interrupt for <xliff:g id="duration" example="2">%1$d</xliff:g> minutes (until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g>)</item>
+ </plurals>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice- spoken summary: alarms only duration hours. -->
+ <plurals name="zen_mode_summary_no_interruptions_by_hour">
+ <item quantity="one">Change to don\'t interrupt for one hour until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g></item>
+ <item quantity="other">Change to don\'t interrupt for <xliff:g id="duration" example="2">%1$d</xliff:g> hours until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g></item>
+ </plurals>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice - spoken summary: off. -->
+ <string name="zen_mode_summary_always">Change to always interrupt</string>
+
+ <!-- [CHAR LIMIT=NONE] Zen mode voice: Comma delimited synonyms for indefinte duration -->
+ <string name="zen_mode_duration_indefinite_voice_synonyms">forever</string>
+
<!-- [CHAR LIMIT=20] Notifications settings: Apps section header -->
<string name="notification_settings_apps_title">App notifications</string>