1
0
mirror of https://github.com/vector-im/element-android.git synced 2025-08-01 18:06:54 +03:00

#8964 Adds a callState null check before starting the MicrophoneAccessService

This commit is contained in:
Christian Rowlands
2025-01-28 08:26:19 -05:00
parent af906ce67b
commit 2c2f8bdadc

View File

@ -253,7 +253,7 @@ class VectorCallActivity :
// already been answered before starting the MicrophoneAccessService
// https://github.com/element-hq/element-android/issues/8964
val callState = it.callState.invoke()
if (callState !is CallState.LocalRinging && callState !is CallState.Ended) {
if (callState !is CallState.LocalRinging && callState !is CallState.Ended && callState != null) {
Timber.tag(loggerTag.value).v("Starting microphone foreground service")
val intent = Intent(this, MicrophoneAccessService::class.java)
ContextCompat.startForegroundService(this, intent)