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

Skip to content
Commit 456be2c3 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Clean up STL transitions coroutine management

This CL cleans up the scoping of the coroutines involved in the
transitions of a SceneTransitionLayoutState.

This CL changes the main API to start a transition:
MutableSTLState.startTransition() is now a suspend function which:

  1. Sets the transition as the current STLState.transitionState.
  2. Runs the suspend fun run() method of the transition.
  3. Finishes the transition when the transition is done running.

Doing this makes it easier to correctly scope a transition animation and
removes the need to call finishTransition() when a transition is done.

This CL also renames Transition.finish() to
Transition.freezeAndAnimateToCurrentState().

Bug: 362727477
Test: atest PlatformComposeSceneTransitionLayoutTests
Flag: com.android.systemui.scene_container
Change-Id: I5455dcd75b6cc9d79dcb8afb8dd6ddd6f9bfcdff
parent 51085f46
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment