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

Commit 4d8f7269 authored by Matt Pietal's avatar Matt Pietal
Browse files

Notify light bar controller when GONE

When the scrim state becomes GONE, send an alpha update
to the LightBarController that controls the 3 button nav
color. The ensures the color resets after the bouncer
disappears.

Fixes: 341190547
Test: atest ScrimControllerTest
Flag: EXEMPT bugfix
Change-Id: Iee76f2d6039a69b4bbc129d49be305694736ba8e
parent 575fff61
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -446,6 +446,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
                            mStatusBarKeyguardViewManager.onKeyguardFadedAway();
                        }
                        dispatchScrimsVisible();
                        dispatchBackScrimState(mScrimBehind.getViewAlpha());
                    }
                };

+11 −0
Original line number Diff line number Diff line
@@ -1977,6 +1977,17 @@ public class ScrimControllerTest extends SysuiTestCase {
        verify(mStatusBarKeyguardViewManager).onKeyguardFadedAway();
    }

    @Test
    public void primaryBouncerToGoneOnFinishCallsLightBarController() {
        reset(mLightBarController);
        mScrimController.mBouncerToGoneTransition.accept(
                new TransitionStep(KeyguardState.PRIMARY_BOUNCER, KeyguardState.GONE, 0f,
                        TransitionState.FINISHED, "ScrimControllerTest"));

        verify(mLightBarController).setScrimState(
                any(ScrimState.class), anyFloat(), any(GradientColors.class));
    }

    @Test
    public void testDoNotAnimateChangeIfOccludeAnimationPlaying() {
        mScrimController.setOccludeAnimationPlaying(true);