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

Commit 92dc9d2a authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove special case for replaced transitions" into main

parents e82458ab 8bd1ed80
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -430,14 +430,6 @@ internal class MutableSceneTransitionLayoutStateImpl(
                    check(transitionStates.size == 1)
                    check(transitionStates[0] is TransitionState.Idle)
                    transitionStates = listOf(transition)
                } else if (currentState == transition.replacedTransition) {
                    // Replace the transition.
                    transitionStates =
                        transitionStates.subList(0, transitionStates.lastIndex) + transition

                    // Make sure it is removed from the finishedTransitions set if it was already
                    // finished.
                    finishedTransitions.remove(currentState)
                } else {
                    // Append the new transition.
                    transitionStates = transitionStates + transition
+3 −0
Original line number Diff line number Diff line
@@ -132,6 +132,9 @@ class InterruptionHandlerTest {
        assertThat(state.currentTransitions)
            .comparingElementsUsing(FromToCurrentTriple)
            .containsExactly(
                // Initial transition, A => B.
                Triple(SceneA, SceneB, SceneB),

                // Initial transition reversed, B back to A.
                Triple(SceneA, SceneB, SceneA),