Merge pull request #4728 from vector-im/feature/adm/proxity-sensor-not-releasing
Proximity sensor not releasing
This commit is contained in:
commit
63660ab496
|
@ -0,0 +1 @@
|
||||||
|
Fixing proximity sensor still being active after a call
|
|
@ -93,7 +93,9 @@ class CallProximityManager @Inject constructor(
|
||||||
if (wakeLock == null) {
|
if (wakeLock == null) {
|
||||||
wakeLock = powerManager.newWakeLock(PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK, generateWakeLockTag())
|
wakeLock = powerManager.newWakeLock(PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK, generateWakeLockTag())
|
||||||
}
|
}
|
||||||
wakeLock?.acquire(WAKE_LOCK_TIMEOUT_MILLIS)
|
wakeLock
|
||||||
|
?.takeIf { !it.isHeld }
|
||||||
|
?.acquire(WAKE_LOCK_TIMEOUT_MILLIS)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun onProximityFar() {
|
private fun onProximityFar() {
|
||||||
|
|
Loading…
Reference in New Issue