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

Commit 3ca0c570 authored by András Kurucz's avatar András Kurucz
Browse files

Fix LightReveal Scrim animation flickering

Sometimes the NotificationShadeWindow was becoming invisible during
a LightReveal Scrim animation causing it to flicker.

A reliable repro:
 - have a device with AOD on
 - send a HUN and press the power button while the HUN is HUNning
 - this will make the HUN to animate away
 - the end of the animation triggers a call on NotificationPanelViewController#updateExpansionAndVisibility()
 - which checks NPVC#isExpanded, which at the moment thinks that there
   is no reason to keep the NotificationShade open, so it tries to close
   it

This fix adds a check to NPVC#isExpanded to see if we have the
UnlockedScreenOff animation running.

Note: `UnlockedScreenOffAnimationController#startAnimation()` does a call to NPVC#showAodUi() which sets a property (expansionFraction), which makes the NPVC#isExpanded() `true`, but it is fired async to fix another animation issue, so there is a window where NPVC#isExpanded() needs this new condition to keep the shade visible.

Test: post a HUN, lock the device, and observe the animation
Test: atest NotificationPanelViewControllerTest
Fixes: b/278810768
Change-Id: I326bce6b6d636301f9e1f17f49dfdb4252289aa5
parent b75484c0
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