Skip to content

Comments

Proximity sensor not releasing#4728

Merged
bmarty merged 2 commits intodevelopfrom
feature/adm/proxity-sensor-not-releasing
Dec 15, 2021
Merged

Proximity sensor not releasing#4728
bmarty merged 2 commits intodevelopfrom
feature/adm/proxity-sensor-not-releasing

Conversation

@ouchadam
Copy link
Contributor

@ouchadam ouchadam commented Dec 15, 2021

Fixes #2467 Proximity sensor not releasing

Wake locks are reference counted which means we would need to release as many times as we acquire in order to fully release the proximity sensor. It's possible that the onProximityNear / onProximityFar may not trigger as cleanly as we expect on some devices which can cause multiple wakelock acquires

  • Guards the proximity wake lock acquiring by checking if we already have one active.

was able to reproduce the original issue by commenting out the onProximityFar and triggering the proximity sensor multiple times whilst in a call

@github-actions
Copy link

Unit Test Results

  66 files  ±0    66 suites  ±0   1m 4s ⏱️ +10s
135 tests ±0  135 ✔️ ±0  0 💤 ±0  0 ±0 
418 runs  ±0  418 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 8c913d2. ± Comparison against base commit 4949a06.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bmarty bmarty merged commit 63660ab into develop Dec 15, 2021
@bmarty bmarty deleted the feature/adm/proxity-sensor-not-releasing branch December 15, 2021 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proximity sensor works after call finished

2 participants