Loading packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/content/state/TransitionState.kt +26 −4 Original line number Original line Diff line number Diff line Loading @@ -140,7 +140,15 @@ sealed interface TransitionState { check( check( (fromContent == fromOrToScene && toContent == overlay) || (fromContent == fromOrToScene && toContent == overlay) || (fromContent == overlay && toContent == fromOrToScene) (fromContent == overlay && toContent == fromOrToScene) ) ) { buildString { appendLine("invalid ShowOrHideOverlay transition:") appendLine(" fromContent: $fromContent") appendLine(" toContent: $toContent") appendLine(" fromOrToScene: $fromOrToScene") appendLine(" overlay: $overlay") } } } } final override fun computeCurrentOverlays(): Set<OverlayKey> { final override fun computeCurrentOverlays(): Set<OverlayKey> { Loading Loading @@ -178,7 +186,9 @@ sealed interface TransitionState { abstract val effectivelyShownOverlay: OverlayKey abstract val effectivelyShownOverlay: OverlayKey init { init { check(fromOverlay != toOverlay) check(fromOverlay != toOverlay) { "fromOverlay ($fromOverlay) and toOverlay ($toOverlay) cannot be the same" } } } final override fun computeCurrentOverlays(): Set<OverlayKey> { final override fun computeCurrentOverlays(): Set<OverlayKey> { Loading Loading @@ -307,12 +317,24 @@ sealed interface TransitionState { private var _coroutineScope: CoroutineScope? = null private var _coroutineScope: CoroutineScope? = null init { init { check(fromContent != toContent) check(fromContent != toContent) { "fromContent ($fromContent) and toContent ($toContent) cannot be the same" } check( check( replacedTransition == null || replacedTransition == null || (replacedTransition.fromContent == fromContent && (replacedTransition.fromContent == fromContent && replacedTransition.toContent == toContent) replacedTransition.toContent == toContent) ) { buildString { appendLine("invalid replacedTransition:") appendLine(" fromContent: $fromContent") appendLine(" toContent: $toContent") appendLine( " replacedTransition.fromContent: ${replacedTransition?.fromContent}" ) ) appendLine(" replacedTransition.toContent: ${replacedTransition?.toContent}") } } } } /** /** Loading Loading
packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/content/state/TransitionState.kt +26 −4 Original line number Original line Diff line number Diff line Loading @@ -140,7 +140,15 @@ sealed interface TransitionState { check( check( (fromContent == fromOrToScene && toContent == overlay) || (fromContent == fromOrToScene && toContent == overlay) || (fromContent == overlay && toContent == fromOrToScene) (fromContent == overlay && toContent == fromOrToScene) ) ) { buildString { appendLine("invalid ShowOrHideOverlay transition:") appendLine(" fromContent: $fromContent") appendLine(" toContent: $toContent") appendLine(" fromOrToScene: $fromOrToScene") appendLine(" overlay: $overlay") } } } } final override fun computeCurrentOverlays(): Set<OverlayKey> { final override fun computeCurrentOverlays(): Set<OverlayKey> { Loading Loading @@ -178,7 +186,9 @@ sealed interface TransitionState { abstract val effectivelyShownOverlay: OverlayKey abstract val effectivelyShownOverlay: OverlayKey init { init { check(fromOverlay != toOverlay) check(fromOverlay != toOverlay) { "fromOverlay ($fromOverlay) and toOverlay ($toOverlay) cannot be the same" } } } final override fun computeCurrentOverlays(): Set<OverlayKey> { final override fun computeCurrentOverlays(): Set<OverlayKey> { Loading Loading @@ -307,12 +317,24 @@ sealed interface TransitionState { private var _coroutineScope: CoroutineScope? = null private var _coroutineScope: CoroutineScope? = null init { init { check(fromContent != toContent) check(fromContent != toContent) { "fromContent ($fromContent) and toContent ($toContent) cannot be the same" } check( check( replacedTransition == null || replacedTransition == null || (replacedTransition.fromContent == fromContent && (replacedTransition.fromContent == fromContent && replacedTransition.toContent == toContent) replacedTransition.toContent == toContent) ) { buildString { appendLine("invalid replacedTransition:") appendLine(" fromContent: $fromContent") appendLine(" toContent: $toContent") appendLine( " replacedTransition.fromContent: ${replacedTransition?.fromContent}" ) ) appendLine(" replacedTransition.toContent: ${replacedTransition?.toContent}") } } } } /** /** Loading