From bf4737a089c8352e1306bd9209af758dd3b0543a Mon Sep 17 00:00:00 2001 From: Oussama Hassine Date: Tue, 28 May 2024 13:24:31 +0200 Subject: [PATCH] fix: proximity sensor keeps turning the screen off even when there is no call --- .../com/wire/android/ui/calling/ProximitySensorManager.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/com/wire/android/ui/calling/ProximitySensorManager.kt b/app/src/main/kotlin/com/wire/android/ui/calling/ProximitySensorManager.kt index b61eaccabf7..1c102fba06a 100644 --- a/app/src/main/kotlin/com/wire/android/ui/calling/ProximitySensorManager.kt +++ b/app/src/main/kotlin/com/wire/android/ui/calling/ProximitySensorManager.kt @@ -63,6 +63,9 @@ class ProximitySensorManager @Inject constructor( } fun unRegisterListener() { + if (wakeLock.isHeld) { + wakeLock.release() + } sensorManager.unregisterListener(sensorEventListener) }