Loading packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerContent.kt +1 −1 Original line number Diff line number Diff line Loading @@ -528,7 +528,7 @@ private fun FoldAware( // Update state whenever currentSceneKey has changed. LaunchedEffect(state, currentSceneKey) { if (currentSceneKey != state.transitionState.currentScene) { state.setTargetScene(currentSceneKey, coroutineScope = this) state.setTargetScene(currentSceneKey, animationScope = this) } } Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt +1 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ constructor( // Update state whenever currentSceneKey has changed. LaunchedEffect(state, currentScene) { if (currentScene != state.transitionState.currentScene) { state.setTargetScene(currentScene, coroutineScope = this) state.setTargetScene(currentScene, animationScope = this) } } Loading packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneTransitionLayoutDataSource.kt +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ class SceneTransitionLayoutDataSource( state.setTargetScene( targetScene = toScene, transitionKey = transitionKey, coroutineScope = coroutineScope, animationScope = coroutineScope, ) } Loading packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt +2 −2 Original line number Diff line number Diff line Loading @@ -597,7 +597,7 @@ internal fun SceneTransitionLayoutForTesting( ) { val density = LocalDensity.current val layoutDirection = LocalLayoutDirection.current val coroutineScope = rememberCoroutineScope() val animationScope = rememberCoroutineScope() val layoutImpl = remember { SceneTransitionLayoutImpl( state = state as MutableSceneTransitionLayoutStateImpl, Loading @@ -606,7 +606,7 @@ internal fun SceneTransitionLayoutForTesting( swipeSourceDetector = swipeSourceDetector, transitionInterceptionThreshold = transitionInterceptionThreshold, builder = builder, animationScope = coroutineScope, animationScope = animationScope, ) .also { onLayoutImpl?.invoke(it) } } Loading packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt +4 −5 Original line number Diff line number Diff line Loading @@ -121,14 +121,13 @@ sealed interface MutableSceneTransitionLayoutState : SceneTransitionLayoutState * might still be interrupted, for instance by another call to [setTargetScene] or by a user * gesture. * * If [coroutineScope] is cancelled during the transition and that the transition was still * If [animationScope] is cancelled during the transition and that the transition was still * active, then the [transitionState] of this [MutableSceneTransitionLayoutState] will be set to * `TransitionState.Idle(targetScene)`. */ fun setTargetScene( targetScene: SceneKey, // TODO(b/362727477): Rename to animationScope. coroutineScope: CoroutineScope, animationScope: CoroutineScope, transitionKey: TransitionKey? = null, ): Pair<TransitionState.Transition, Job>? Loading Loading @@ -302,12 +301,12 @@ internal class MutableSceneTransitionLayoutStateImpl( override fun setTargetScene( targetScene: SceneKey, coroutineScope: CoroutineScope, animationScope: CoroutineScope, transitionKey: TransitionKey?, ): Pair<TransitionState.Transition.ChangeScene, Job>? { checkThread() return coroutineScope.animateToScene( return animationScope.animateToScene( layoutState = this@MutableSceneTransitionLayoutStateImpl, target = targetScene, transitionKey = transitionKey, Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerContent.kt +1 −1 Original line number Diff line number Diff line Loading @@ -528,7 +528,7 @@ private fun FoldAware( // Update state whenever currentSceneKey has changed. LaunchedEffect(state, currentSceneKey) { if (currentSceneKey != state.transitionState.currentScene) { state.setTargetScene(currentSceneKey, coroutineScope = this) state.setTargetScene(currentSceneKey, animationScope = this) } } Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt +1 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ constructor( // Update state whenever currentSceneKey has changed. LaunchedEffect(state, currentScene) { if (currentScene != state.transitionState.currentScene) { state.setTargetScene(currentScene, coroutineScope = this) state.setTargetScene(currentScene, animationScope = this) } } Loading
packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneTransitionLayoutDataSource.kt +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ class SceneTransitionLayoutDataSource( state.setTargetScene( targetScene = toScene, transitionKey = transitionKey, coroutineScope = coroutineScope, animationScope = coroutineScope, ) } Loading
packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt +2 −2 Original line number Diff line number Diff line Loading @@ -597,7 +597,7 @@ internal fun SceneTransitionLayoutForTesting( ) { val density = LocalDensity.current val layoutDirection = LocalLayoutDirection.current val coroutineScope = rememberCoroutineScope() val animationScope = rememberCoroutineScope() val layoutImpl = remember { SceneTransitionLayoutImpl( state = state as MutableSceneTransitionLayoutStateImpl, Loading @@ -606,7 +606,7 @@ internal fun SceneTransitionLayoutForTesting( swipeSourceDetector = swipeSourceDetector, transitionInterceptionThreshold = transitionInterceptionThreshold, builder = builder, animationScope = coroutineScope, animationScope = animationScope, ) .also { onLayoutImpl?.invoke(it) } } Loading
packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt +4 −5 Original line number Diff line number Diff line Loading @@ -121,14 +121,13 @@ sealed interface MutableSceneTransitionLayoutState : SceneTransitionLayoutState * might still be interrupted, for instance by another call to [setTargetScene] or by a user * gesture. * * If [coroutineScope] is cancelled during the transition and that the transition was still * If [animationScope] is cancelled during the transition and that the transition was still * active, then the [transitionState] of this [MutableSceneTransitionLayoutState] will be set to * `TransitionState.Idle(targetScene)`. */ fun setTargetScene( targetScene: SceneKey, // TODO(b/362727477): Rename to animationScope. coroutineScope: CoroutineScope, animationScope: CoroutineScope, transitionKey: TransitionKey? = null, ): Pair<TransitionState.Transition, Job>? Loading Loading @@ -302,12 +301,12 @@ internal class MutableSceneTransitionLayoutStateImpl( override fun setTargetScene( targetScene: SceneKey, coroutineScope: CoroutineScope, animationScope: CoroutineScope, transitionKey: TransitionKey?, ): Pair<TransitionState.Transition.ChangeScene, Job>? { checkThread() return coroutineScope.animateToScene( return animationScope.animateToScene( layoutState = this@MutableSceneTransitionLayoutStateImpl, target = targetScene, transitionKey = transitionKey, Loading