Merge "Show icons for allowed sounds" into main

This commit is contained in:
Matías Hernández
2024-07-19 17:06:27 +00:00
committed by Android (Google) Code Review
16 changed files with 389 additions and 105 deletions

View File

@@ -0,0 +1,28 @@
<!--
~ 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.
-->
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:shape="oval">
<size
android:width="@dimen/zen_mode_circular_icon_diameter"
android:height="@dimen/zen_mode_circular_icon_diameter" />
<solid android:color="?androidprv:attr/materialColorSecondaryContainer" />
<!-- TODO: b/346551087 - Include border (or not) according to final design
<stroke android:width="1dp" android:color="?androidprv:attr/materialColorOnSecondaryContainer" />
-->
</shape>

View File

@@ -17,8 +17,8 @@
<ImageView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/zen_mode_circular_icon_size"
android:layout_height="@dimen/zen_mode_circular_icon_size"
android:layout_width="@dimen/zen_mode_circular_icon_diameter"
android:layout_height="@dimen/zen_mode_circular_icon_diameter"
android:layout_marginTop="@dimen/zen_mode_circular_icon_margin_vertical"
android:layout_marginBottom="@dimen/zen_mode_circular_icon_margin_vertical"
android:layout_marginEnd="@dimen/zen_mode_circular_icon_margin_between" />

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
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.
-->
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:layout_width="@dimen/zen_mode_circular_icon_diameter"
android:layout_height="@dimen/zen_mode_circular_icon_diameter"
android:layout_marginTop="@dimen/zen_mode_circular_icon_margin_vertical"
android:layout_marginBottom="@dimen/zen_mode_circular_icon_margin_vertical"
android:gravity="center"
android:padding="4dp"
android:drawablePadding="0dp"
android:background="@drawable/preference_circular_icons_plus_item_background"
android:textColor="?androidprv:attr/materialColorOnSecondaryContainer"
android:maxLines="1"
android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="6sp" />

View File

@@ -509,7 +509,8 @@
<dimen name="zen_mode_icon_list_item_circle_diameter">56dp</dimen>
<dimen name="zen_mode_icon_list_item_icon_size">32dp</dimen>
<!-- For the items in the CircularIconsPreference (contacts, apps, sound channels). -->
<dimen name="zen_mode_circular_icon_size">32dp</dimen>
<dimen name="zen_mode_circular_icon_diameter">32dp</dimen>
<dimen name="zen_mode_circular_icon_inner_icon_size">20dp</dimen>
<dimen name="zen_mode_circular_icon_margin_between">4dp</dimen>
<dimen name="zen_mode_circular_icon_margin_vertical">8dp</dimen>
</resources>

View File

@@ -9366,6 +9366,8 @@
<string name="zen_mode_apps_work_app"><xliff:g id="app_label" example="Chrome">%s</xliff:g> (Work)</string>
<!-- Text displayed (for a brief time) while the list of bypassing apps is being fetched. Will be replaced by a zen_mode_apps_subtext. [CHAR_LIMIT=60] -->
<string name="zen_mode_apps_calculating">Calculating\u2026</string>
<!-- Priority Modes: Format for a string displayed when there are more items (e.g. apps, contacts) that can be shown. For example, we show (A)(B)(C)(+5), where this string represents the "+5" value. Needs to be as compact as possible, since it will be drawn in a really small area. [CHAR_LIMIT=4] -->
<string name="zen_mode_plus_n_items">+<xliff:g id="number" example="42">%d</xliff:g></string>
<!-- [CHAR LIMIT=100] Zen mode settings: Allow apps to bypass DND -->
<string name="zen_mode_bypassing_apps">Allow apps to override</string>