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 504f6e2a2c
commit 4639e054bb

View file

@ -617,6 +617,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))
} }
} }
} }
@ -628,6 +629,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))
} }
} }
} }