mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 01:19:33 +00:00
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
+1
-4
@@ -201,13 +201,10 @@ 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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user