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

Skip to content
Commit 83b3d0fd authored by dshivangi's avatar dshivangi
Browse files

Do not play fold animation when sleep on fold

Currently when the device is folded with fold setting 'Never' on of two
happens:
1. AOD enabled: AOD animation is played along with Folding animation
2. AOD disabled: The logic waits 2 seconds for the screen to turns on,
meanwhile in case the screen is turned on for some other reason(power button
press, tap to wake) then the respective animation could be seen along
with folding animation.

As a solution in this change, every time while preparing to play fold
animation we will also listen for device to go to sleep.
The animation is only played if the device did not go to sleep on fold,
otherwise the inner flow is completed immediately and clean-up is
carried out.
Fixes: 329229552, 328570727
Flag: ACONFIG fold_lock_setting_enabled NEXTFOOD
Test: Flash build locally to device
* Fold -> Unfold the device with different fold setting values and AOD
  disabled/enabled
* Check if fold animation is playing correctly and not interfering with
  other animations
* Also confirm perfetto traces to check if folding animation is
  finishing immediately(unlike currently it is taking ~200ms to finish)

Change-Id: Ifcade3fcff638109e91572550885bccd8ec0be6b
parent 7cd86981
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment