Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt +4 −8 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import androidx.compose.ui.unit.IntRect import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.android.compose.animation.scene.SceneScope import com.android.compose.modifiers.padding import com.android.compose.modifiers.thenIf import com.android.systemui.compose.modifiers.sysuiResTag import com.android.systemui.keyguard.ui.composable.LockscreenLongPress import com.android.systemui.keyguard.ui.composable.section.AmbientIndicationSection Loading Loading @@ -97,16 +96,13 @@ constructor( ) } Box { Box(modifier = Modifier.fillMaxWidth()) { with(topAreaSection) { DefaultClockLayout( smartSpacePaddingTop = viewModel::getSmartSpacePaddingTop, isShadeLayoutWide = isShadeLayoutWide, modifier = Modifier.thenIf(isShadeLayoutWide) { Modifier.fillMaxWidth(0.5f) } .graphicsLayer { Modifier.fillMaxWidth().graphicsLayer { translationX = unfoldTranslations.start }, ) Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt +14 −10 Original line number Diff line number Diff line Loading @@ -81,10 +81,7 @@ constructor( .padding(horizontal = dimensionResource(R.dimen.clock_padding_start)) .padding(top = { smallTopMargin }) .onTopPlacementChanged(onTopChanged) .burnInAware( viewModel = aodBurnInViewModel, params = burnInParams, ) .burnInAware(viewModel = aodBurnInViewModel, params = burnInParams) .element(smallClockElementKey), ) } Loading Loading @@ -114,10 +111,7 @@ constructor( val dir = if (transition.toContent == splitShadeLargeClockScene) -1f else 1f val distance = dir * getClockCenteringDistance() val largeClock = checkNotNull(currentClock).largeClock largeClock.animations.onPositionUpdated( distance = distance, fraction = progress, ) largeClock.animations.onPositionUpdated(distance = distance, fraction = progress) } Element(key = largeClockElementKey, modifier = modifier) { Loading @@ -125,6 +119,16 @@ constructor( AndroidView( factory = { context -> FrameLayout(context).apply { // By default, ViewGroups like FrameLayout clip their children. Turning // off the clipping allows the child view to render outside of its // bounds - letting the step animation of the clock push the digits out // when needed. // // Note that, in Compose, clipping is actually disabled by default so // there's no need to propagate this up the composable hierarchy. clipChildren = false clipToPadding = false ensureClockViewExists(checkNotNull(currentClock).largeClock.view) } }, Loading @@ -136,8 +140,8 @@ constructor( .burnInAware( viewModel = aodBurnInViewModel, params = burnInParams, isClock = true ) isClock = true, ), ) } } Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt +4 −8 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import androidx.compose.ui.unit.IntRect import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.android.compose.animation.scene.SceneScope import com.android.compose.modifiers.padding import com.android.compose.modifiers.thenIf import com.android.systemui.compose.modifiers.sysuiResTag import com.android.systemui.keyguard.ui.composable.LockscreenLongPress import com.android.systemui.keyguard.ui.composable.section.AmbientIndicationSection Loading Loading @@ -97,16 +96,13 @@ constructor( ) } Box { Box(modifier = Modifier.fillMaxWidth()) { with(topAreaSection) { DefaultClockLayout( smartSpacePaddingTop = viewModel::getSmartSpacePaddingTop, isShadeLayoutWide = isShadeLayoutWide, modifier = Modifier.thenIf(isShadeLayoutWide) { Modifier.fillMaxWidth(0.5f) } .graphicsLayer { Modifier.fillMaxWidth().graphicsLayer { translationX = unfoldTranslations.start }, ) Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt +14 −10 Original line number Diff line number Diff line Loading @@ -81,10 +81,7 @@ constructor( .padding(horizontal = dimensionResource(R.dimen.clock_padding_start)) .padding(top = { smallTopMargin }) .onTopPlacementChanged(onTopChanged) .burnInAware( viewModel = aodBurnInViewModel, params = burnInParams, ) .burnInAware(viewModel = aodBurnInViewModel, params = burnInParams) .element(smallClockElementKey), ) } Loading Loading @@ -114,10 +111,7 @@ constructor( val dir = if (transition.toContent == splitShadeLargeClockScene) -1f else 1f val distance = dir * getClockCenteringDistance() val largeClock = checkNotNull(currentClock).largeClock largeClock.animations.onPositionUpdated( distance = distance, fraction = progress, ) largeClock.animations.onPositionUpdated(distance = distance, fraction = progress) } Element(key = largeClockElementKey, modifier = modifier) { Loading @@ -125,6 +119,16 @@ constructor( AndroidView( factory = { context -> FrameLayout(context).apply { // By default, ViewGroups like FrameLayout clip their children. Turning // off the clipping allows the child view to render outside of its // bounds - letting the step animation of the clock push the digits out // when needed. // // Note that, in Compose, clipping is actually disabled by default so // there's no need to propagate this up the composable hierarchy. clipChildren = false clipToPadding = false ensureClockViewExists(checkNotNull(currentClock).largeClock.view) } }, Loading @@ -136,8 +140,8 @@ constructor( .burnInAware( viewModel = aodBurnInViewModel, params = burnInParams, isClock = true ) isClock = true, ), ) } } Loading