Commit Graph

18 Commits

Author SHA1 Message Date
Matías Hernández
c2d2de085d Changes to icon picker for reusability in "add mode" flow
* 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
2024-06-26 11:38:56 +02:00
Yuri Lin
84dd202d09 Merge "Add "delete mode" option on mode configuration page" into main 2024-06-24 19:30:47 +00:00
Yuri Lin
eb7285170b Add "delete mode" option on mode configuration page
Flag: android.app.modes_ui
Bug: 346575126
Test: manual
Change-Id: I0d085eb54ef5fa07f312bdddf0219855bf1c2ef4
2024-06-24 14:16:47 -04:00
Ioana Alexandru
b1dad7d5b4 Move ZenModesBackend to SettingsLib.
This will allow us to access it from SystemUI.

Bug: 346519570
Test: builds
Flag: EXEMPT trivial refactor
Change-Id: I5bc480bd4eb0cbf8a26989dd11c064e66e5ee70e
2024-06-21 15:19:11 +02:00
Julia Reynolds
3b62c23310 Design refresh for modes that don't filter notifications
And fix a crash noticed in ZenModeAppsLinkPreferenceController

Test: atest com/android/settings/notification/modes
Fixes: 308820027
Flag: android.app.modes_ui
Change-Id: I0cfe4e10ca7ff97dac3b3b8756cc36f4d6f91ea2
2024-06-20 13:10:36 +00:00
Matías Hernández
0bf4899f3e Support adding an automatic schedule to previously-manual system-owned modes
Bug: 342156843
Bug: 326442408
Flag: android.app.modes_ui
Test: atest com.android.settings.notification.modes
Change-Id: Ib7d15b8fc949fa73015537f03a882ef7eb6b4bcd
2024-06-19 15:06:08 +02:00
Matías Hernández
ee414b4c43 Extract the not-strictly-modes-related parts of ZenModesBackend
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
2024-06-17 18:11:39 +02:00
Alexander Roederer
41902bb0c5 Modify Summary for Mode's Apps settings page
Adds call to SummaryHelper to set Apps preference summary.

Bug: 308819928
Test: atest ZenModeAppsLinkPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: Iebec11afc62ecb79386e1866af57cd4e68461a95
2024-06-15 04:48:38 +00:00
Matías Hernández
8d397f038f Add icon picker for zen modes
Bug: 333901673
Test: atest ZenModeIconPickerListPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: Ib6faaac7c93b25423d18dbdcd0a2310de15fa86f
2024-06-10 19:37:49 +02:00
Yuri Lin
f29f44296a Add page for choosing calendar & reply for event modes.
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
2024-05-29 17:29:23 +00:00
Alexander Roederer
4e10ac8dae Merge changes from topic "b308819928-ModesSettingsAppBreakthroughPage" into main
* changes:
  Moves ZenModeBypassingAppsSettings into modes dir
  Adds modes settings page for bypassing apps
2024-05-29 14:20:02 +00:00
Alexander Roederer
c512046eb9 Adds modes settings page for bypassing apps
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
2024-05-28 22:12:27 +00:00
Julia Reynolds
97b462dbf0 Add button for activating modes manually
Fixes: 308819907
Flag: android.app.modes_ui
Test: ZenModeButtonPreferenceControllerTest
Test: atest com.android.settings.notification.modes
Change-Id: Id018d360c648dd948d2f950ca67cfbea71cc5c68
2024-05-28 13:17:43 -04:00
Julia Reynolds
4a84e58dba Add display and notif vis effects to new modes ui
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Fixes: 337087926
Fixes: 308820151
Change-Id: Id9cd9cc4b2d521713a2ba1d4581eb818ad0e5eee
2024-05-22 13:22:16 -04:00
Julia Reynolds
3f2bcf973a Migrate alarms and other interruptions to modes_ui
Also add missing tests for repeat callers

Flag: android.app.modes_ui
Test: ZenModesSummaryHelperTest
Test: ZenModeOtherPreferenceControllerTest
Test: ZenModeOtherLinkPreferenceControllerTest
Bug: 337086854
Change-Id: Ie0a849de61c32b5f9feacae9a1bac457f9dd526c
2024-05-21 11:54:48 -04:00
Julia Reynolds
2bd1799fb9 Migrate people settings to new modes UI
Flag: android.app.modes_ui
Bug: 337079247
Test: make -j RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.notification.modes
Change-Id: If5e7b82a006e856b4aceca7acdfc8cc0d11092a7
2024-05-20 21:29:13 +00:00
Julia Reynolds
b42553dccc Some minor additions (icons, sorting) to modes
Test: manually viewing pages
Flag: android.app.modes_ui
Fixes: 331429435
Fixes: 308819461
Bug: 322373473
Change-Id: I17e6df82e17a4cfadc2948258829746cdb5473db
2024-05-17 14:21:54 +00:00
Yuri Lin
eff863e5a3 Redirect to new modes page when modes_ui is on.
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
2024-05-15 14:00:25 -04:00