Release proximity wakelock on Element Call when call ends (#6825)

The `CoroutineScope` that launched this logic was cancelled by that point, so the wakelock was never released.
This commit is contained in:
Jorge Martin Espinosa 2026-05-20 15:23:03 +02:00 committed by GitHub
parent 3593ca36d9
commit c3fedbf997

View file

@ -201,12 +201,9 @@ class WebViewAudioManager(
return return
} }
coroutineScope.launch { // Since this should run when the call is no longer running, it should be OK to not use the mutex here
proximitySensorMutex.withLock { if (proximitySensorWakeLock?.isHeld == true) {
if (proximitySensorWakeLock?.isHeld == true) { proximitySensorWakeLock?.release()
proximitySensorWakeLock?.release()
}
}
} }
audioManager.mode = AudioManager.MODE_NORMAL audioManager.mode = AudioManager.MODE_NORMAL