Do not play notification sound in DND mode

This commit is contained in:
Juha Heinanen
2022-05-09 07:49:15 +03:00
parent 845aab5fb0
commit 9e52522ffd

View File

@ -1015,7 +1015,11 @@ class BaresipService: Service() {
nm.notify(MESSAGE_NOTIFICATION_ID, nb.build())
return
}
nt.play()
if (VERSION.SDK_INT >= 23) {
if (nm.currentInterruptionFilter <= NotificationManager.INTERRUPTION_FILTER_ALL)
nt.play()
} else
nt.play()
postServiceEvent(ServiceEvent("message show", arrayListOf(uap, peer), System.nanoTime()))
}