Skip to content

Commit 2c2f8bd

Browse files
#8964 Adds a callState null check before starting the MicrophoneAccessService
1 parent af906ce commit 2c2f8bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vector/src/main/java/im/vector/app/features/call/VectorCallActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ class VectorCallActivity :
253253
// already been answered before starting the MicrophoneAccessService
254254
// https://github.com/element-hq/element-android/issues/8964
255255
val callState = it.callState.invoke()
256-
if (callState !is CallState.LocalRinging && callState !is CallState.Ended) {
256+
if (callState !is CallState.LocalRinging && callState !is CallState.Ended && callState != null) {
257257
Timber.tag(loggerTag.value).v("Starting microphone foreground service")
258258
val intent = Intent(this, MicrophoneAccessService::class.java)
259259
ContextCompat.startForegroundService(this, intent)

0 commit comments

Comments
 (0)