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
Loading
Please register or sign in to comment