diff options
| author | 2023-10-31 16:20:42 +0100 | |
|---|---|---|
| committer | 2023-11-10 19:23:14 +0100 | |
| commit | 4f16f1590fbd6278b18c697ce07ea8c1f1876bc8 (patch) | |
| tree | 8d55375c42d6f1e515daf69a0107435643fe5968 /api/api.go | |
| parent | 7a4bca8a418dc072ba21bac1d6f2e64ed74f4400 (diff) | |
Update behavior of "global" DND APIs
* setInterruptionFilter() no longer changes the global DND state, but instead creates (or updates) an AutomaticZenRule with that filter value and enables it.
* setNotificationPolicy() no longer changes the user's DND preferences, but instead creates (or updates) an AutomaticZenRule with that Policy.
* getNotificationPolicy() returns the Policy supplied to setNotificationPolicy(), if it was called before, or the global policy otherwise. This is to ensure that the get/set methods are reasonably symmetrical (also, it's "the notification policy that will be applied when calling setInterruptionFilter", so it's consistent).
The new behavior is target-sdk-gated via CompatChanges (MANAGE_GLOBAL_ZEN_VIA_IMPLICIT_RULES).
Bug: 308670109
Bug: 308670855
Test: atest NotificationManagerServiceTest ZenModeHelperTest ZenAdaptersTest
Change-Id: I662ee26c8b8972e11feee705855574814318831c
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions