Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/MagneticNotificationRowManagerImplTest.kt +13 −0 Original line number Diff line number Diff line Loading @@ -247,6 +247,19 @@ class MagneticNotificationRowManagerImplTest : SysuiTestCase() { assertThat(underTest.currentState).isEqualTo(State.IDLE) } @Test fun onMagneticInteractionEnd_whileTargetsSet_goesToIdle() = kosmos.testScope.runTest { // GIVEN that targets are set setTargets() // WHEN the interaction ends on the row underTest.onMagneticInteractionEnd(swipedRow, velocity = null) // THEN the state resets assertThat(underTest.currentState).isEqualTo(State.IDLE) } @Test fun onMagneticInteractionEnd_whileDetached_goesToIdle() = kosmos.testScope.runTest { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/MagneticNotificationRowManagerImpl.kt +1 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ constructor( translationOffset = 0f if (row.isSwipedTarget()) { when (currentState) { State.TARGETS_SET -> currentState = State.IDLE State.PULLING -> { snapNeighborsBack(velocity) currentState = State.IDLE Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/MagneticNotificationRowManagerImplTest.kt +13 −0 Original line number Diff line number Diff line Loading @@ -247,6 +247,19 @@ class MagneticNotificationRowManagerImplTest : SysuiTestCase() { assertThat(underTest.currentState).isEqualTo(State.IDLE) } @Test fun onMagneticInteractionEnd_whileTargetsSet_goesToIdle() = kosmos.testScope.runTest { // GIVEN that targets are set setTargets() // WHEN the interaction ends on the row underTest.onMagneticInteractionEnd(swipedRow, velocity = null) // THEN the state resets assertThat(underTest.currentState).isEqualTo(State.IDLE) } @Test fun onMagneticInteractionEnd_whileDetached_goesToIdle() = kosmos.testScope.runTest { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/MagneticNotificationRowManagerImpl.kt +1 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ constructor( translationOffset = 0f if (row.isSwipedTarget()) { when (currentState) { State.TARGETS_SET -> currentState = State.IDLE State.PULLING -> { snapNeighborsBack(velocity) currentState = State.IDLE Loading