fix: do not show notification when call is ended

This commit is contained in:
darthpaul
2021-09-24 22:56:43 +01:00
parent 11c6bc9dee
commit 3023881015

View File

@ -14,7 +14,9 @@ class CallService : InCallService() {
private val callListener = object : Call.Callback() { private val callListener = object : Call.Callback() {
override fun onStateChanged(call: Call, state: Int) { override fun onStateChanged(call: Call, state: Int) {
super.onStateChanged(call, state) super.onStateChanged(call, state)
callNotificationManager.setupNotification() if(state != Call.STATE_DISCONNECTED){
callNotificationManager.setupNotification()
}
if (state == Call.STATE_ACTIVE) { if (state == Call.STATE_ACTIVE) {
callDurationHelper.start() callDurationHelper.start()
} else if (state == Call.STATE_DISCONNECTED || state == Call.STATE_DISCONNECTING) { } else if (state == Call.STATE_DISCONNECTED || state == Call.STATE_DISCONNECTING) {