Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt +18 −16 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ constructor( private val clockInteractor: KeyguardClockInteractor, ) { @Composable fun DefaultClockLayout( fun SceneScope.DefaultClockLayout( modifier: Modifier = Modifier, ) { val currentClockLayout by clockViewModel.currentClockLayout.collectAsStateWithLifecycle() Loading Loading @@ -95,7 +95,8 @@ constructor( } } SceneTransitionLayout(state, modifier) { Column(modifier) { SceneTransitionLayout(state) { scene(splitShadeLargeClockScene) { LargeClockWithSmartSpace( shouldOffSetClockToOneHalf = !hasCustomPositionUpdatedAnimation Loading @@ -116,6 +117,8 @@ constructor( WeatherLargeClockWithSmartSpace(modifier = Modifier.fillMaxWidth(0.5f)) } } with(mediaCarouselSection) { KeyguardMediaCarousel() } } } @Composable Loading @@ -136,7 +139,6 @@ constructor( onTopChanged = burnIn.onSmartspaceTopChanged, ) } with(mediaCarouselSection) { KeyguardMediaCarousel() } } } Loading packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaScenePicker.kt +10 −16 Original line number Diff line number Diff line Loading @@ -42,23 +42,9 @@ object MediaScenePicker : ElementScenePicker { toSceneZIndex: Float ): SceneKey? { return when { // TODO: 352052894 - update with the actual scene picking transition.isTransitioning(from = Scenes.Lockscreen, to = Scenes.Shade) -> { if (transition.progress < SHADE_FRACTION) { Scenes.Lockscreen } else { shouldElevateMedia(transition) -> { Scenes.Shade } } // TODO: 345467290 - update with the actual scene picking transition.isTransitioning(from = Scenes.Shade, to = Scenes.Lockscreen) -> { if (transition.progress < 1f - SHADE_FRACTION) { Scenes.Shade } else { Scenes.Lockscreen } } // TODO: 345467290 - update with the actual scene picking transition.isTransitioningBetween(Scenes.QuickSettings, Scenes.Shade) -> { Loading @@ -69,4 +55,12 @@ object MediaScenePicker : ElementScenePicker { else -> pickSingleSceneIn(scenes, transition, element) } } /** Returns true when the media should be laid on top of the rest for the given [transition]. */ fun shouldElevateMedia(transition: TransitionState.Transition?): Boolean { if (transition == null) { return false } return transition.isTransitioningBetween(Scenes.Lockscreen, Scenes.Shade) } } packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt +8 −1 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import com.android.systemui.common.ui.compose.windowinsets.LocalScreenCornerRadi import com.android.systemui.compose.modifiers.sysuiResTag import com.android.systemui.dagger.SysUISingleton import com.android.systemui.media.controls.ui.composable.MediaCarousel import com.android.systemui.media.controls.ui.composable.MediaScenePicker import com.android.systemui.media.controls.ui.controller.MediaCarouselController import com.android.systemui.media.controls.ui.controller.MediaHierarchyManager import com.android.systemui.media.controls.ui.view.MediaHost Loading Loading @@ -360,7 +361,13 @@ private fun SceneScope.SingleShade( maxNotifScrimTop.value = quickSettingsPlaceable.height.toFloat() layout(constraints.maxWidth, constraints.maxHeight) { quickSettingsPlaceable.placeRelative(x = 0, y = 0) val qsZIndex = if (MediaScenePicker.shouldElevateMedia(layoutState.currentTransition)) { 1f } else { 0f } quickSettingsPlaceable.placeRelative(x = 0, y = 0, zIndex = qsZIndex) notificationsPlaceable.placeRelative(x = 0, y = maxNotifScrimTop.value.roundToInt()) } } Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt +18 −16 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ constructor( private val clockInteractor: KeyguardClockInteractor, ) { @Composable fun DefaultClockLayout( fun SceneScope.DefaultClockLayout( modifier: Modifier = Modifier, ) { val currentClockLayout by clockViewModel.currentClockLayout.collectAsStateWithLifecycle() Loading Loading @@ -95,7 +95,8 @@ constructor( } } SceneTransitionLayout(state, modifier) { Column(modifier) { SceneTransitionLayout(state) { scene(splitShadeLargeClockScene) { LargeClockWithSmartSpace( shouldOffSetClockToOneHalf = !hasCustomPositionUpdatedAnimation Loading @@ -116,6 +117,8 @@ constructor( WeatherLargeClockWithSmartSpace(modifier = Modifier.fillMaxWidth(0.5f)) } } with(mediaCarouselSection) { KeyguardMediaCarousel() } } } @Composable Loading @@ -136,7 +139,6 @@ constructor( onTopChanged = burnIn.onSmartspaceTopChanged, ) } with(mediaCarouselSection) { KeyguardMediaCarousel() } } } Loading
packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaScenePicker.kt +10 −16 Original line number Diff line number Diff line Loading @@ -42,23 +42,9 @@ object MediaScenePicker : ElementScenePicker { toSceneZIndex: Float ): SceneKey? { return when { // TODO: 352052894 - update with the actual scene picking transition.isTransitioning(from = Scenes.Lockscreen, to = Scenes.Shade) -> { if (transition.progress < SHADE_FRACTION) { Scenes.Lockscreen } else { shouldElevateMedia(transition) -> { Scenes.Shade } } // TODO: 345467290 - update with the actual scene picking transition.isTransitioning(from = Scenes.Shade, to = Scenes.Lockscreen) -> { if (transition.progress < 1f - SHADE_FRACTION) { Scenes.Shade } else { Scenes.Lockscreen } } // TODO: 345467290 - update with the actual scene picking transition.isTransitioningBetween(Scenes.QuickSettings, Scenes.Shade) -> { Loading @@ -69,4 +55,12 @@ object MediaScenePicker : ElementScenePicker { else -> pickSingleSceneIn(scenes, transition, element) } } /** Returns true when the media should be laid on top of the rest for the given [transition]. */ fun shouldElevateMedia(transition: TransitionState.Transition?): Boolean { if (transition == null) { return false } return transition.isTransitioningBetween(Scenes.Lockscreen, Scenes.Shade) } }
packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt +8 −1 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import com.android.systemui.common.ui.compose.windowinsets.LocalScreenCornerRadi import com.android.systemui.compose.modifiers.sysuiResTag import com.android.systemui.dagger.SysUISingleton import com.android.systemui.media.controls.ui.composable.MediaCarousel import com.android.systemui.media.controls.ui.composable.MediaScenePicker import com.android.systemui.media.controls.ui.controller.MediaCarouselController import com.android.systemui.media.controls.ui.controller.MediaHierarchyManager import com.android.systemui.media.controls.ui.view.MediaHost Loading Loading @@ -360,7 +361,13 @@ private fun SceneScope.SingleShade( maxNotifScrimTop.value = quickSettingsPlaceable.height.toFloat() layout(constraints.maxWidth, constraints.maxHeight) { quickSettingsPlaceable.placeRelative(x = 0, y = 0) val qsZIndex = if (MediaScenePicker.shouldElevateMedia(layoutState.currentTransition)) { 1f } else { 0f } quickSettingsPlaceable.placeRelative(x = 0, y = 0, zIndex = qsZIndex) notificationsPlaceable.placeRelative(x = 0, y = maxNotifScrimTop.value.roundToInt()) } } Loading