Skip to content

Commit

Permalink
#8964 Adds a callState null check before starting the MicrophoneAcces…
Browse files Browse the repository at this point in the history
…sService
  • Loading branch information
christianrowlands committed Jan 28, 2025
1 parent af906ce commit 2c2f8bd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2c2f8bd

Please sign in to comment.