Merge "Changes to the trigger segment" into main

This commit is contained in:
Matías Hernández
2024-07-23 20:02:56 +00:00
committed by Android (Google) Code Review
6 changed files with 356 additions and 126 deletions

View File

@@ -0,0 +1,26 @@
<!--
Copyright (C) 2024 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportHeight="960"
android:viewportWidth="960"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M200,840Q167,840 143.5,816.5Q120,793 120,760L120,600L200,600L200,760Q200,760 200,760Q200,760 200,760L760,760Q760,760 760,760Q760,760 760,760L760,200Q760,200 760,200Q760,200 760,200L200,200Q200,200 200,200Q200,200 200,200L200,360L120,360L120,200Q120,167 143.5,143.5Q167,120 200,120L760,120Q793,120 816.5,143.5Q840,167 840,200L840,760Q840,793 816.5,816.5Q793,840 760,840L200,840ZM420,680L364,622L466,520L120,520L120,440L466,440L364,338L420,280L620,480L420,680Z" />
</vector>

View File

@@ -0,0 +1,25 @@
<!--
Copyright (C) 2024 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportHeight="960"
android:viewportWidth="960">
<path
android:fillColor="@android:color/white"
android:pathData="M352,840L200,840Q167,840 143.5,816.5Q120,793 120,760L120,608Q168,608 204,577.5Q240,547 240,500Q240,453 204,422.5Q168,392 120,392L120,240Q120,207 143.5,183.5Q167,160 200,160L360,160Q360,118 389,89Q418,60 460,60Q502,60 531,89Q560,118 560,160L720,160Q753,160 776.5,183.5Q800,207 800,240L800,400Q842,400 871,429Q900,458 900,500Q900,542 871,571Q842,600 800,600L800,760Q800,793 776.5,816.5Q753,840 720,840L568,840Q568,790 536.5,755Q505,720 460,720Q415,720 383.5,755Q352,790 352,840ZM200,760L285,760Q309,694 362,667Q415,640 460,640Q505,640 558,667Q611,694 635,760L720,760L720,520L800,520Q808,520 814,514Q820,508 820,500Q820,492 814,486Q808,480 800,480L720,480L720,240L480,240L480,160Q480,152 474,146Q468,140 460,140Q452,140 446,146Q440,152 440,160L440,240L200,240L200,328Q254,348 287,395Q320,442 320,500Q320,557 287,604Q254,651 200,672L200,760ZM460,500L460,500Q460,500 460,500Q460,500 460,500Q460,500 460,500Q460,500 460,500L460,500L460,500L460,500Q460,500 460,500Q460,500 460,500Q460,500 460,500Q460,500 460,500L460,500L460,500L460,500L460,500Q460,500 460,500Q460,500 460,500Q460,500 460,500Q460,500 460,500L460,500L460,500L460,500Q460,500 460,500Q460,500 460,500Q460,500 460,500Q460,500 460,500Z" />
</vector>

View File

@@ -8126,9 +8126,9 @@
<!-- Do not disturb: Subtitle for the Visual signals option to toggle on/off visual signals/alerts when the screen is on/when screen is off. [CHAR LIMIT=30] -->
<string name="zen_mode_visual_signals_settings_subtitle">Allow visual signals</string>
<!-- Do not disturb: mode page section title [CHAR LIMIT=80] -->
<!-- Priority Modes: mode page section title [CHAR LIMIT=80] -->
<string name="mode_interruption_filter_title">Stay focused</string>
<!-- Do not disturb: mode page section title [CHAR LIMIT=80] -->
<!-- Priority Modes: mode page section title [CHAR LIMIT=80] -->
<string name="mode_device_effects_title">Additional actions</string>
<!-- Summary for the Sound Do not Disturb option when DND isn't currently on. [CHAR LIMIT=NONE]-->
@@ -9485,6 +9485,19 @@
<!-- Priority Modes: Hint for the EditText for editing a mode's name [CHAR LIMIT=30] -->
<string name="zen_mode_edit_name_hint">Mode name</string>
<!-- Priority Modes: Trigger title for modes of type SCHEDULE_CALENDAR. [CHAR LIMIT=30] -->
<string name="zen_mode_trigger_title_schedule_calendar">Calendar events</string>
<!-- Priority Modes: Trigger title for modes of type BEDTIME. [CHAR LIMIT=30] -->
<string name="zen_mode_trigger_title_bedtime">Sleep schedule</string>
<!-- Priority Modes: Trigger title for modes of type DRIVING. [CHAR LIMIT=30] -->
<string name="zen_mode_trigger_title_driving">While driving</string>
<!-- Priority Modes: Generic trigger title for modes of other types [CHAR LIMIT=30] -->
<string name="zen_mode_trigger_title_generic">Linked to app</string>
<!-- Priority Modes: Generic trigger summary for modes where the owner app did not provide a triggerDescription but did provide a configurationActivity to call [CHAR LIMIT=60] -->
<string name="zen_mode_trigger_summary_settings_in_app">Info and settings in <xliff:g id="app_name" example="The Awesome App">%1$s</xliff:g></string>
<!-- Priority Modes: Generic trigger summary for modes where the owner app did not provide neither a triggerDescription nor a configurationActivity to call [CHAR LIMIT=60] -->
<string name="zen_mode_trigger_summary_managed_by_app">Managed by <xliff:g id="app_name" example="The Awesome App">%1$s</xliff:g></string>
<!-- Content description for help icon button [CHAR LIMIT=20] -->
<string name="warning_button_text">Warning</string>

View File

@@ -28,6 +28,21 @@
android:selectable="false"
android:layout="@layout/modes_activation_button"/>
<!-- automatic trigger section; preference changes programmatically depending on type -->
<PreferenceCategory
android:key="zen_automatic_trigger_category"
android:title="@string/zen_mode_automatic_trigger_title">
<!-- For configuring the trigger on tap and enabling/disabling the mode with the switch. -->
<com.android.settingslib.PrimarySwitchPreference
android:key="zen_automatic_trigger_settings" />
<!-- For adding a trigger for custom manual modes (no switch). -->
<Preference
android:key="zen_add_automatic_trigger"
android:title="@string/zen_mode_select_schedule"
android:icon="@drawable/ic_add_24dp"
settings:isPreferenceVisible="false" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/mode_interruption_filter_title"
android:key="modes_filters">
@@ -49,14 +64,6 @@
android:title="@string/zen_category_exceptions" />
</PreferenceCategory>
<!-- automatic trigger section; preference changes programmatically depending on type -->
<PreferenceCategory
android:key="zen_automatic_trigger_category"
android:title="@string/zen_mode_automatic_trigger_title">
<com.android.settingslib.PrimarySwitchPreference
android:key="zen_automatic_trigger_settings" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/mode_device_effects_title"
android:key="modes_additional_actions">