Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bf08bf6 authored by Lucas Silva's avatar Lucas Silva
Browse files

Implement different thresholds for entering and exiting posturing

Simply tapping the screen while the device is on a dock might cause
enough movement to dip the confidence below the 0.8 threshold. This
currently causes the device to exit the postured state. To account for
this, we now implement different thresholds for entering and exiting the
state. The confidence needs to be high to enter (0.8f) - but as long as
the confidence remains above 0.5f then we will not exit the state. This
allows the phone to move slightly while postured without exiting.

This change also refactors some of the logging and batches updates with
a small debounce delay to reduce log noise.

Fixes: 413035192
Test: atest PosturingInteractorTest
Flag: android.service.dreams.allow_dream_when_postured
Change-Id: Id29cc77489eba6e7c1357c4d284efbcf7262df43
parent 7fad8780
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment