diff options
2 files changed, 18 insertions, 18 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt index 7956d0293a1d..9643f192e066 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt @@ -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 @@ -97,18 +96,15 @@ constructor( ) } - Box { + Box(modifier = Modifier.fillMaxWidth()) { with(topAreaSection) { DefaultClockLayout( smartSpacePaddingTop = viewModel::getSmartSpacePaddingTop, isShadeLayoutWide = isShadeLayoutWide, modifier = - Modifier.thenIf(isShadeLayoutWide) { - Modifier.fillMaxWidth(0.5f) - } - .graphicsLayer { - translationX = unfoldTranslations.start - }, + Modifier.fillMaxWidth().graphicsLayer { + translationX = unfoldTranslations.start + }, ) } if (isShadeLayoutWide && !isBypassEnabled) { diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt index eae46e90557a..fb01e7039edd 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt @@ -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), ) } @@ -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) { @@ -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) } }, @@ -136,8 +140,8 @@ constructor( .burnInAware( viewModel = aodBurnInViewModel, params = burnInParams, - isClock = true - ) + isClock = true, + ), ) } } |