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

Commit 541ba40f authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Remove BaseSceneTransitionLayoutState

This CL removes BaseSceneTransitionLayoutState which is not necessary
anymore now that HoistedSceneTransitionLayoutState was removed.

Bug: 353679003
Test: atest PlatformComposeSceneTransitionLayoutTests
Flag: com.android.systemui.scene_container
Change-Id: I68e919c70d3e343ecc1ef1832c1828eb5892659e
parent 1d1a9c34
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ import kotlinx.coroutines.launch
 * the currently running transition, if there is one.
 */
internal fun CoroutineScope.animateToScene(
    layoutState: BaseSceneTransitionLayoutState,
    layoutState: MutableSceneTransitionLayoutStateImpl,
    target: SceneKey,
    transitionKey: TransitionKey?,
): TransitionState.Transition? {
@@ -154,7 +154,7 @@ internal fun CoroutineScope.animateToScene(
}

private fun CoroutineScope.animate(
    layoutState: BaseSceneTransitionLayoutState,
    layoutState: MutableSceneTransitionLayoutStateImpl,
    targetScene: SceneKey,
    transitionKey: TransitionKey?,
    isInitiatedByUserInput: Boolean,
+2 −5
Original line number Diff line number Diff line
@@ -369,9 +369,6 @@ private class DragControllerImpl(
            // immediately go back B => A.
            if (targetScene != swipeTransition._currentScene) {
                swipeTransition._currentScene = targetScene
                with(draggableHandler.layoutImpl.state) {
                    draggableHandler.coroutineScope.onChangeScene(targetScene.key)
                }
            }

            swipeTransition.animateOffset(
@@ -511,7 +508,7 @@ private class DragControllerImpl(
}

private fun SwipeTransition(
    layoutState: BaseSceneTransitionLayoutState,
    layoutState: MutableSceneTransitionLayoutStateImpl,
    coroutineScope: CoroutineScope,
    fromScene: Scene,
    result: UserActionResult,
@@ -566,7 +563,7 @@ private fun SwipeTransition(old: SwipeTransition): SwipeTransition {

private class SwipeTransition(
    val layoutImpl: SceneTransitionLayoutImpl,
    val layoutState: BaseSceneTransitionLayoutState,
    val layoutState: MutableSceneTransitionLayoutStateImpl,
    val coroutineScope: CoroutineScope,
    override val key: TransitionKey?,
    val _fromScene: Scene,
+2 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ import kotlinx.coroutines.launch

@Composable
internal fun PredictiveBackHandler(
    state: BaseSceneTransitionLayoutState,
    state: MutableSceneTransitionLayoutStateImpl,
    coroutineScope: CoroutineScope,
    targetSceneForBack: SceneKey? = null,
) {
@@ -65,7 +65,7 @@ internal fun PredictiveBackHandler(
}

private class PredictiveBackTransition(
    val state: BaseSceneTransitionLayoutState,
    val state: MutableSceneTransitionLayoutStateImpl,
    val coroutineScope: CoroutineScope,
    fromScene: SceneKey,
    toScene: SceneKey,
+1 −1
Original line number Diff line number Diff line
@@ -514,7 +514,7 @@ internal fun SceneTransitionLayoutForTesting(
    val coroutineScope = rememberCoroutineScope()
    val layoutImpl = remember {
        SceneTransitionLayoutImpl(
                state = state as BaseSceneTransitionLayoutState,
                state = state as MutableSceneTransitionLayoutStateImpl,
                density = density,
                layoutDirection = layoutDirection,
                swipeSourceDetector = swipeSourceDetector,
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ internal typealias MovableElementContent = @Composable (@Composable () -> Unit)

@Stable
internal class SceneTransitionLayoutImpl(
    internal val state: BaseSceneTransitionLayoutState,
    internal val state: MutableSceneTransitionLayoutStateImpl,
    internal var density: Density,
    internal var layoutDirection: LayoutDirection,
    internal var swipeSourceDetector: SwipeSourceDetector,
Loading