From b05166b7fb2f6063e48871a386e4e16c17acdfc8 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 22 Nov 2024 10:36:35 +0100 Subject: [PATCH] Fix crash when resuming the call from the notification. Fixes #3905 --- .../android/features/call/impl/ui/ElementCallActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/ElementCallActivity.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/ElementCallActivity.kt index 0495f8ec7d..8b6d1e45bd 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/ElementCallActivity.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/ElementCallActivity.kt @@ -200,12 +200,14 @@ class ElementCallActivity : Timber.tag(loggerTag.value).d("Set the call type and create the presenter") webViewTarget.value = callType presenter = presenterFactory.create(callType!!, this) + } else if (callType == null) { + Timber.tag(loggerTag.value).d("Coming back from notification, do nothing") } else if (callType != currentCallType) { Timber.tag(loggerTag.value).d("User starts another call, restart the Activity") setIntent(intent) recreate() } else { - Timber.tag(loggerTag.value).d("Coming back from notification, do nothing") + Timber.tag(loggerTag.value).d("Other case, do nothing") } }