diff options
author | 2024-11-18 20:34:22 +0000 | |
---|---|---|
committer | 2024-11-18 20:34:22 +0000 | |
commit | 92dc9d2ad53038c4353e6777cd27f71235f63a34 (patch) | |
tree | b0a82175f91e9f1dcf00fe4dce4e44b501a36f5a | |
parent | e82458abfe184a62bf5719b22730191482865ac9 (diff) | |
parent | 8bd1ed8052f329f67bb9a6974d5341664bebaa09 (diff) |
Merge "Remove special case for replaced transitions" into main
2 files changed, 3 insertions, 8 deletions
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt index b3fd097946d0..4bccac1e3ba0 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt @@ -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 diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/InterruptionHandlerTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/InterruptionHandlerTest.kt index b87cc5c88335..3622369b8ff9 100644 --- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/InterruptionHandlerTest.kt +++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/InterruptionHandlerTest.kt @@ -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), |