setDND

open fun setDND(context: Context, dnd: Boolean)

Enables or disables local Do-Not-Disturb. While enabled the service auto-declines every incoming call with 486 Busy Here (a 4XX), so the PBX keeps ringing the user's other devices — this is device-local only.

Parameters

context

application context

dnd

true to enable local DND, false to disable