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 64d9336901
commit 42566b4b1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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