mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 04:52:00 +03:00
Merge pull request #4728 from vector-im/feature/adm/proxity-sensor-not-releasing
Proximity sensor not releasing
This commit is contained in:
commit
63660ab496
2 changed files with 4 additions and 1 deletions
1
changelog.d/2467.bugfix
Normal file
1
changelog.d/2467.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fixing proximity sensor still being active after a call
|
|
@ -93,7 +93,9 @@ class CallProximityManager @Inject constructor(
|
|||
if (wakeLock == null) {
|
||||
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() {
|
||||
|
|
Loading…
Reference in a new issue