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:
committed by
GitHub
parent
64d9336901
commit
42566b4b1f
+3
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user