disable default notification sounds for incoming calls
This commit is contained in:
parent
6bf34e3a84
commit
772a28eb9e
1 changed files with 2 additions and 0 deletions
|
|
@ -58,6 +58,7 @@ class DialerCallService : Service() {
|
||||||
NotificationChannel(channelId, name, importance).apply {
|
NotificationChannel(channelId, name, importance).apply {
|
||||||
enableLights(false)
|
enableLights(false)
|
||||||
enableVibration(false)
|
enableVibration(false)
|
||||||
|
setSound(null, null)
|
||||||
notificationManager.createNotificationChannel(this)
|
notificationManager.createNotificationChannel(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -71,6 +72,7 @@ class DialerCallService : Service() {
|
||||||
.setPriority(NotificationCompat.PRIORITY_MAX)
|
.setPriority(NotificationCompat.PRIORITY_MAX)
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
.setChannelId(channelId)
|
.setChannelId(channelId)
|
||||||
|
.setSound(null)
|
||||||
.setUsesChronometer(callStatus == Call.STATE_ACTIVE)
|
.setUsesChronometer(callStatus == Call.STATE_ACTIVE)
|
||||||
.addAction(0, getString(R.string.decline_call), getDeclineCallIntent())
|
.addAction(0, getString(R.string.decline_call), getDeclineCallIntent())
|
||||||
.addAction(0, getString(R.string.answer_call), getAnswerCallIntent())
|
.addAction(0, getString(R.string.answer_call), getAnswerCallIntent())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue