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

Commit e785134e authored by András Kurucz's avatar András Kurucz Committed by Automerger Merge Worker
Browse files

Merge "Fix LightReveal Scrim animation flickering" into udc-dev am: 9f200877

parents 3625de69 9f200877
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2917,6 +2917,10 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
                && mBarState == StatusBarState.SHADE;
    }

    private boolean isPanelVisibleBecauseScrimIsAnimatingOff() {
        return mUnlockedScreenOffAnimationController.isAnimationPlaying();
    }

    @Override
    public boolean shouldHideStatusBarIconsWhenExpanded() {
        if (mIsLaunchAnimationRunning) {
@@ -3976,6 +3980,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
                || isPanelVisibleBecauseOfHeadsUp()
                || mTracking
                || mHeightAnimator != null
                || isPanelVisibleBecauseScrimIsAnimatingOff()
                && !mIsSpringBackAnimation;
    }

+34 −3
Original line number Diff line number Diff line
@@ -1106,7 +1106,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
    }

    @Test
    public void shadeExpanded_inShadeState() {
    public void shadeFullyExpanded_inShadeState() {
        mStatusBarStateController.setState(SHADE);

        mNotificationPanelViewController.setExpandedHeight(0);
@@ -1118,7 +1118,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
    }

    @Test
    public void shadeExpanded_onKeyguard() {
    public void shadeFullyExpanded_onKeyguard() {
        mStatusBarStateController.setState(KEYGUARD);

        int transitionDistance = mNotificationPanelViewController.getMaxPanelTransitionDistance();
@@ -1127,8 +1127,39 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
    }

    @Test
    public void shadeExpanded_onShadeLocked() {
    public void shadeFullyExpanded_onShadeLocked() {
        mStatusBarStateController.setState(SHADE_LOCKED);
        assertThat(mNotificationPanelViewController.isShadeFullyExpanded()).isTrue();
    }

    @Test
    public void shadeExpanded_whenHasHeight() {
        int transitionDistance = mNotificationPanelViewController.getMaxPanelTransitionDistance();
        mNotificationPanelViewController.setExpandedHeight(transitionDistance);
        assertThat(mNotificationPanelViewController.isExpanded()).isTrue();
    }

    @Test
    public void shadeExpanded_whenInstantExpanding() {
        mNotificationPanelViewController.expand(true);
        assertThat(mNotificationPanelViewController.isExpanded()).isTrue();
    }

    @Test
    public void shadeExpanded_whenHunIsPresent() {
        when(mHeadsUpManager.hasPinnedHeadsUp()).thenReturn(true);
        assertThat(mNotificationPanelViewController.isExpanded()).isTrue();
    }

    @Test
    public void shadeExpanded_whenWaitingForExpandGesture() {
        mNotificationPanelViewController.startWaitingForExpandGesture();
        assertThat(mNotificationPanelViewController.isExpanded()).isTrue();
    }

    @Test
    public void shadeExpanded_whenUnlockedOffscreenAnimationRunning() {
        when(mUnlockedScreenOffAnimationController.isAnimationPlaying()).thenReturn(true);
        assertThat(mNotificationPanelViewController.isExpanded()).isTrue();
    }
}