Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +1 −1 Original line number Diff line number Diff line Loading @@ -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( Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithmTest.kt +20 −0 Original line number Diff line number Diff line Loading @@ -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() Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +1 −1 Original line number Diff line number Diff line Loading @@ -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( Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithmTest.kt +20 −0 Original line number Diff line number Diff line Loading @@ -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() Loading