Add default icons for all mode types

Also a couple of icon-related fixes:
* Use the proper context, since we need theming (this also means it cannot be stored in IconLoader, which is a singleton, and must be supplied).
* Force apply the standard size and tint, since app-provided icons may be arbitrary.
* Fix the schedule-time icon (the viewport size was incorrect).

Bug: 308819461
Fixes: 333528437
Flag: android.app.modes_ui
Test: atest com.android.settings.notification.modes
Change-Id: Iae447c8c4a0218a8bc989c01d1d56d0c06abd8e7
This commit is contained in:
Matías Hernández
2024-05-30 18:06:39 +02:00
parent 1bfea5d472
commit fcb8acc277
15 changed files with 246 additions and 68 deletions

View File

@@ -62,7 +62,7 @@ class ZenModeHeaderController extends AbstractZenModePreferenceController {
}
FutureUtil.whenDone(
zenMode.getIcon(IconLoader.getInstance(mContext)),
zenMode.getIcon(mContext, IconLoader.getInstance()),
icon -> mHeaderController.setIcon(icon)
.setLabel(zenMode.getRule().getName())
.done(false /* rebindActions */),