disable default notification sounds for incoming calls

This commit is contained in:
tibbi 2018-11-26 10:54:52 +01:00
parent 6bf34e3a84
commit 772a28eb9e
1 changed files with 2 additions and 0 deletions

View File

@ -58,6 +58,7 @@ class DialerCallService : Service() {
NotificationChannel(channelId, name, importance).apply {
enableLights(false)
enableVibration(false)
setSound(null, null)
notificationManager.createNotificationChannel(this)
}
}
@ -71,6 +72,7 @@ class DialerCallService : Service() {
.setPriority(NotificationCompat.PRIORITY_MAX)
.setOngoing(true)
.setChannelId(channelId)
.setSound(null)
.setUsesChronometer(callStatus == Call.STATE_ACTIVE)
.addAction(0, getString(R.string.decline_call), getDeclineCallIntent())
.addAction(0, getString(R.string.answer_call), getAnswerCallIntent())