Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ddbbc44 authored by Aaron Liu's avatar Aaron Liu Committed by Android (Google) Code Review
Browse files

Merge "Remove MovableElement for small clock." into main

parents 7f991aa6 6f126f45
Loading
Loading
Loading
Loading
+18 −27
Original line number Diff line number Diff line
@@ -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
@@ -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