From a6d6fd7b3bd804b8e701b9918aef929903527bc2 Mon Sep 17 00:00:00 2001 From: David Langley Date: Mon, 6 Dec 2021 13:05:37 +0000 Subject: [PATCH 1/3] state can also be connected --- .../android/sdk/internal/session/call/model/MxCallImpl.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt index cda513e9d2e..61d33be6902 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt @@ -205,8 +205,8 @@ internal class MxCallImpl( Timber.tag(loggerTag.value).v("select answer $callId") if (!isOutgoing) return // This is an outgoing call, select the remote client that answered. - if (state != CallState.Dialing) { - Timber.tag(loggerTag.value).w("Expected state is CallState.Dialing got $state.") + if (state is CallState.Dialing || state is CallState.Connected) { + Timber.tag(loggerTag.value).w("Expected state is CallState.Dialing or CallState.Connected got $state.") } CallSelectAnswerContent( callId = callId, From 03be698a7e087d5fc8fadc00183f1fb0a4846e08 Mon Sep 17 00:00:00 2001 From: David Langley Date: Mon, 6 Dec 2021 13:46:56 +0000 Subject: [PATCH 2/3] Fix waring for state is not dialing or connected --- changelog.d/4636.bugfix | 1 + .../android/sdk/internal/session/call/model/MxCallImpl.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/4636.bugfix diff --git a/changelog.d/4636.bugfix b/changelog.d/4636.bugfix new file mode 100644 index 00000000000..ec95696a4f1 --- /dev/null +++ b/changelog.d/4636.bugfix @@ -0,0 +1 @@ +Update log warning for call selection during voip calls. \ No newline at end of file diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt index 61d33be6902..7f0d2c71053 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt @@ -205,7 +205,7 @@ internal class MxCallImpl( Timber.tag(loggerTag.value).v("select answer $callId") if (!isOutgoing) return // This is an outgoing call, select the remote client that answered. - if (state is CallState.Dialing || state is CallState.Connected) { + if (state !is CallState.Dialing && state !is CallState.Connected) { Timber.tag(loggerTag.value).w("Expected state is CallState.Dialing or CallState.Connected got $state.") } CallSelectAnswerContent( From 747030b578fda24c79ff73ae4305d46c237263a9 Mon Sep 17 00:00:00 2001 From: David Langley Date: Mon, 6 Dec 2021 14:37:36 +0000 Subject: [PATCH 3/3] use != rather that is --- .../android/sdk/internal/session/call/model/MxCallImpl.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt index 7f0d2c71053..a89713870a7 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt @@ -205,7 +205,7 @@ internal class MxCallImpl( Timber.tag(loggerTag.value).v("select answer $callId") if (!isOutgoing) return // This is an outgoing call, select the remote client that answered. - if (state !is CallState.Dialing && state !is CallState.Connected) { + if (state != CallState.Dialing && state !is CallState.Connected) { Timber.tag(loggerTag.value).w("Expected state is CallState.Dialing or CallState.Connected got $state.") } CallSelectAnswerContent(