Commit Graph

11 Commits

Author SHA1 Message Date
Matías Hernández
b152c2d34f Fix stray ProfileSelectDialog when only one profile exists
Fixes: 377829434
Test: atest ZenModePrioritySendersPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: Ia5f667fd937107af98dfb3a073cadeb935ff8a8a
2024-11-07 18:52:59 +01:00
Matías Hernández
504e927168 Better Support for profiles in "People that can interrupt"
* Show contacts from personal and work profile.
* Open personal or work profile Contacts app when choosing settings.
* Skip conversations with no ShortcutInfo (they are returned for a disabled work profile but we cannot show an icon for them).

Fixes: 371513451
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: Id8653a85ee4fd15dfccbecb3ea2d31e615d29f8c
2024-10-07 17:37:37 +02:00
Matías Hernández
58a110bc48 Set content description for the "settings" of starred contacts, priority conversations, etc
Fixes: 368124250
Test: manual, with Talkback
Flag: android.app.modes_ui
Change-Id: Ib4e8bdd5ea0931db2049925f82696d3a55f35bcb
2024-10-01 18:51:19 +02:00
Alexander Roederer
64593a873a Adds Zen metrics categories
Assigns metrics categories to all modes pages under
ZenModesListFragment. Includes new metrics categories where appropriate.

Bug: 332937635
Test: Build and flash
Flag: android.app.modes_ui
Change-Id: Ic19862ec194b40eae294d3c30240fe3f51304665
2024-08-14 20:27:13 +00:00
Matías Hernández
a4c99767b7 Overhaul the message senders screen
* Fix combinations of messages=all with other conversation values.
* Correctly display policies with CONVERSATION_SENDERS_ANYONE. An additional checkbox is included, but _only_ if the policy has CONVERSATION_SENDERS_ANYONE when shown.
* Changed updateState() to consider the possible cases one by one. Because multiple policies are mapped to the same checkbox states, the strategy of "checking whether the state matches what the checkbox wants to set" doesn't really work.
* Fix messages summary and circles to support CONVERSATION_SENDERS_ANYONE.
* Added a lot of tests (actually, hopefully ALL OF THEM) covering the user-visible behavior. :)

Fixes: 354658240
Test: atest ZenModesSummaryHelperTest ZenModePrioritySendersPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: I727496ca3eb820e4baaab942b61d2e57cdb491fc
2024-08-02 12:36:44 +02:00
Matías Hernández
d8b9fe8f01 Show icons for allowed contacts
Test: atest com.android.settings.notification.modes
Bug: 346551087
Flag: android.app.modes_ui
Change-Id: If2b6b06b4a9c16bdefb03850ad1615e96c601fbd
2024-07-22 14:20:25 +02: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
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
Julia Reynolds
91c67cf728 Fix Messages onClick.
The state of the preference doesn't change until after we get the
callback.

Test: ZenModePrioritySendersPreferenceControllerTest
Flag: android.app.modes_ui
Fixes: 337079247
Change-Id: I1c98561de89e9398f26300bb14710f18991f78f4
2024-05-28 13:42:38 +00:00
Matías Hernández
43d67b0080 Refactor preference controllers to receive and mutate ZenMode/ZenPolicy
Also fixed a handful of style issues / warnings along the way.

Fixes: 341950853
Fixes: 341910620
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: I65900941fcdf53824caf052fd0a24401c1bfb476
2024-05-23 20:29:06 +00: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