Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4f16f159 authored by Matías Hernández's avatar Matías Hernández
Browse files

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
parent 7a4bca8a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment