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

Commit 56e0263b authored by András Kurucz's avatar András Kurucz Committed by Android (Google) Code Review
Browse files

Merge "Keep the pulsing notifications in place while animating away" into main

parents 6dd4ac66 17e542d9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -853,7 +853,7 @@ public class StackScrollAlgorithm {
                }
            }
            if (row.isHeadsUpAnimatingAway()) {
                if (NotificationsImprovedHunAnimation.isEnabled()) {
                if (NotificationsImprovedHunAnimation.isEnabled() && !ambientState.isDozing()) {
                    if (shouldHunAppearFromBottom(ambientState, childState)) {
                        // move to the bottom of the screen
                        childState.setYTranslation(
+20 −0
Original line number Diff line number Diff line
@@ -221,6 +221,26 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
        assertThat(notificationRow.viewState.clipBottomAmount).isEqualTo(0)
    }

    @Test
    @EnableFlags(NotificationsImprovedHunAnimation.FLAG_NAME)
    fun resetViewStates_hunAnimatingAwayWhileDozing_yTranslationIsInset() {
        whenever(notificationRow.isHeadsUpAnimatingAway).thenReturn(true)

        ambientState.isDozing = true

        resetViewStates_hunYTranslationIs(stackScrollAlgorithm.mHeadsUpInset)
    }

    @Test
    @EnableFlags(NotificationsImprovedHunAnimation.FLAG_NAME)
    fun resetViewStates_hunAnimatingAwayWhileDozing_hasStackMargin_changesHunYTranslation() {
        whenever(notificationRow.isHeadsUpAnimatingAway).thenReturn(true)

        ambientState.isDozing = true

        resetViewStates_stackMargin_changesHunYTranslation()
    }

    @Test
    fun resetViewStates_hunsOverlapping_bottomHunClipped() {
        val topHun = mockExpandableNotificationRow()