From d6cdb11e6813dc1432b481cea6e80f0909f5f6eb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 29 May 2024 10:13:24 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20proximity=20sensor=20keeps=20turning=20t?= =?UTF-8?q?he=20screen=20off=20even=20when=20there=20is=20no=20call=20(WPB?= =?UTF-8?q?-9215)=20=F0=9F=8D=92=20(#3052)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Oussama Hassine --- .../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) }