Ask CallActivity to finish if no call found when trying to answer/hangup

This commit is contained in:
Sylvain Berfini 2025-09-05 16:22:34 +02:00
parent 9e39a4799d
commit c2df18a149

View file

@ -611,6 +611,7 @@ class CurrentCallViewModel
coreContext.answerCall(call) coreContext.answerCall(call)
} else { } else {
Log.e("$TAG No call found in incoming state, can't answer any!") Log.e("$TAG No call found in incoming state, can't answer any!")
finishActivityEvent.postValue(Event(true))
} }
} }
} }
@ -622,6 +623,9 @@ class CurrentCallViewModel
Log.i("$TAG Terminating call [${currentCall.remoteAddress.asStringUriOnly()}]") Log.i("$TAG Terminating call [${currentCall.remoteAddress.asStringUriOnly()}]")
terminatedByUser = true terminatedByUser = true
coreContext.terminateCall(currentCall) coreContext.terminateCall(currentCall)
} else {
Log.e("$TAG No call to decline!")
finishActivityEvent.postValue(Event(true))
} }
} }
} }