Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt +18 −27 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import androidx.compose.ui.viewinterop.AndroidView import androidx.core.view.contains import com.android.compose.animation.scene.SceneScope import com.android.compose.modifiers.padding import com.android.systemui.customization.R as customizationR import com.android.systemui.customization.R import com.android.systemui.keyguard.ui.composable.blueprint.ClockElementKeys.largeClockElementKey import com.android.systemui.keyguard.ui.composable.blueprint.ClockElementKeys.smallClockElementKey Loading Loading @@ -65,32 +64,24 @@ constructor( return } val context = LocalContext.current MovableElement(key = smallClockElementKey, modifier = modifier) { content { AndroidView( factory = { context -> FrameLayout(context).apply { ensureClockViewExists(checkNotNull(currentClock).smallClock.view) } }, update = { it.ensureClockViewExists(checkNotNull(currentClock).smallClock.view) }, update = { it.ensureClockViewExists(checkNotNull(currentClock).smallClock.view) }, modifier = Modifier.height(dimensionResource(R.dimen.small_clock_height)) .padding( horizontal = dimensionResource(customizationR.dimen.clock_padding_start) ) modifier .height(dimensionResource(R.dimen.small_clock_height)) .padding(top = { viewModel.getSmallClockTopMargin(context) }) .onTopPlacementChanged(onTopChanged) .burnInAware( viewModel = aodBurnInViewModel, params = burnInParams, ), ) } } .element(smallClockElementKey), ) } @Composable Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt +18 −27 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import androidx.compose.ui.viewinterop.AndroidView import androidx.core.view.contains import com.android.compose.animation.scene.SceneScope import com.android.compose.modifiers.padding import com.android.systemui.customization.R as customizationR import com.android.systemui.customization.R import com.android.systemui.keyguard.ui.composable.blueprint.ClockElementKeys.largeClockElementKey import com.android.systemui.keyguard.ui.composable.blueprint.ClockElementKeys.smallClockElementKey Loading Loading @@ -65,32 +64,24 @@ constructor( return } val context = LocalContext.current MovableElement(key = smallClockElementKey, modifier = modifier) { content { AndroidView( factory = { context -> FrameLayout(context).apply { ensureClockViewExists(checkNotNull(currentClock).smallClock.view) } }, update = { it.ensureClockViewExists(checkNotNull(currentClock).smallClock.view) }, update = { it.ensureClockViewExists(checkNotNull(currentClock).smallClock.view) }, modifier = Modifier.height(dimensionResource(R.dimen.small_clock_height)) .padding( horizontal = dimensionResource(customizationR.dimen.clock_padding_start) ) modifier .height(dimensionResource(R.dimen.small_clock_height)) .padding(top = { viewModel.getSmallClockTopMargin(context) }) .onTopPlacementChanged(onTopChanged) .burnInAware( viewModel = aodBurnInViewModel, params = burnInParams, ), ) } } .element(smallClockElementKey), ) } @Composable Loading