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:
parent
64d9336901
commit
42566b4b1f
1 changed files with 3 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue