Commit Graph

13 Commits

Author SHA1 Message Date
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
Matías Hernández
8409c39d94 First bits of "add a mode"
* Preference below the modes list.
* Temporarily triggers addition of a mode with default name and type=SCHEDULE_TIME (type will be "manual only" later).
* Fixed sorting of modes in the list when refreshing (new modes were added at the bottom instead of where they should, the same would've happened for renamed modes).
* Minor polishes (extracted fragment launch to helper class, renamed item controller class for clarity).

Test: atest com.android.settings.notification.modes
Bug: 326442408
Fixes: 347198709
Flag: android.app.modes_ui
Change-Id: Ie276c92181c5374faf74592433595e7e15a5efc0
2024-06-14 15:23:30 +00:00
Julia Reynolds
71698935f3 Support device effects for manual mode
Test: ZenModesBackendTest
Flag: android.app.modes_ui
Fixes: 333530553
Change-Id: I31c484b73d1dfe0f986fe3c344f3a9a1d8580172
2024-06-12 15:19:42 +00:00
Matías Hernández
52ac9410e8 Merge "Load app-provided mode icons asynchronously, and cache them" into main 2024-05-22 13:57:13 +00:00
Matías Hernández
90f60e5912 Load app-provided mode icons asynchronously, and cache them
Bug: 333528586
Bug: 308819461
Test: atest IconLoaderTest
Flag: android.app.modes_ui
Change-Id: I230d0a17bf21533dfca1f25d4806f9231105801b
2024-05-21 19:16:26 +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
Julia Reynolds
44044a1898 Fix test failures
Test: ZenModesBackendTest
Flag: android.app.modes_ui
Fixes: 341693051
Change-Id: I4149db371a85abe8008c10cf76a84206f75143f6
2024-05-20 13:31:40 -04: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
9dbd8ddffe Merge "Add info on whether the rule is active to ZenMode" into main 2024-04-22 16:20:38 +00:00
Yuri Lin
af82199317 Add info on whether the rule is active to ZenMode
modifying the corresponding methods on ZenModesBackend to collect that information from NotificationManager.

Bug: 327419222
Test: ZenModesBackendTest, ZenModeTest
Change-Id: I01cb0ffa21a7fecaa5128cec51ced3eff384f370
2024-04-22 10:57:32 -04:00
Matías Hernández
c19aba4115 Remove TODO which is resolved by changes in ZenModeHelper
Bug: 326061620
Test: N/A
Change-Id: Ibbf025341c8c1705253accccc5a07b568de6f34a
2024-04-18 17:38:31 +02:00
Matías Hernández
59c6a66f5c Introduce ZenModesBackend and ZenMode
Test: atest ZenModesBackendTest ZenModeTest
Bug: 327419222
Change-Id: Ic2871a6124b2df4b77275b54a940f7b47666991c
2024-04-16 11:21:37 +02:00