Show icons for allowed sounds

(Some icons are temporary, until we get the final assets)

Also some fixes/improvements to CircularIconsPreference:
* Show the correct placeholder and +N icons.
* Fix the displayIcons-before-measure case (global layout listener was incorrect).
* Properly cancel pending image load futures (field didn't point to the actual future).
* Don't reload icons if it's the same set (depends on equals() for the items, so unfortunately doesn't work for AppEntry yet).

Test: atest com.android.settings.notification.modes
Bug: 346551087
Flag: android.app.modes_ui
Change-Id: I9d029a5fdd785ada4e2ba4d8a90eba72b5fb9085
This commit is contained in:
Matías Hernández
2024-07-18 11:32:21 +02:00
parent 0ebc865c5e
commit 352100397f
16 changed files with 389 additions and 105 deletions

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

@@ -9361,6 +9361,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>