* Don't finish the fragment from the controller (ugh!) instead just report the selected icon via a listener.
* Highlight the selected icon in the list.
* Cache the icon drawables (since we're using selectors for the colors, we don't need to swap them, one per icon resource id is enough).
* Improved the tests a bit too.
Bug: 333901673
Bug: 326442408
Test: ates
Flag: android.app.modes_ui
Change-Id: Ib2ec7a7e3ed99b13f9264aa6f7c209ee3f6967a0
This will allow us to access it from SystemUI.
Bug: 346519570
Test: builds
Flag: EXEMPT trivial refactor
Change-Id: I5bc480bd4eb0cbf8a26989dd11c064e66e5ee70e
So that when it's moved to SettingsLib, it doesn't need to carry that baggage.
Bug: 346519570
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: I7911a521d96f5dbac2c2395171d324b7b54b8b07
Also adds the link to set trigger behavior to the main mode page (only for calendar so far), and the switch preference to enable/disable automatic rules (for all but manual DND mode).
Removes the "escape hatch" to allow manual mode to also use the new modes pages.
Ported from ZenModeEventRuleSettings.
Flag: android.app.modes_ui
Bug: 332730302
Test: ZenModeSetCalendarPreferenceControllerTest, ZenModeSetTriggerLinkPreferenceControllerTest, manual
Change-Id: Ia7a716c66663a21494a6c05711250a5bda87ca8c
Adds the settings page that a user will reach from a mode settings page
when they tap on "App," to allow them to select whether all, none, or
priority modes can break through and send notifications.
Bug: 308819928
Bug: 331267485
Flag: android.app.modes_ui DEVELOPMENT
Test: build and test, controller unit tests
Change-Id: I5bcebfca0fc2882f839afdced8d2b817dad14e6c
The new modes page has essentially no content yet, but this is a rough proof of concept for the existing abstract classes and hopefully serves as a building block for future changes. It lists modes and those preferences lead to contentless pages that will be fleshed out later..
Flag: android.app.modes_ui
Bug: 327260745
Test: ZenModePreferenceControllerTest
Test: manual; individual pages only have skeleton functionality and should be unit tested in future CLs
Change-Id: I12f48b48f761e3c9ff1a173445b15f7536d34edb