From 4639e054bbd1d5dd095bd2c3230a23d45cf4cd18 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 5 Sep 2025 16:22:34 +0200 Subject: [PATCH] Ask CallActivity to finish if no call found when trying to answer/hangup --- .../org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt b/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt index b8ccb116d..169c1a66b 100644 --- a/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt +++ b/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt @@ -617,6 +617,7 @@ class CurrentCallViewModel coreContext.answerCall(call) } else { 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()}]") terminatedByUser = true coreContext.terminateCall(currentCall) + } else { + Log.e("$TAG No call to decline!") + finishActivityEvent.postValue(Event(true)) } } }