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

Commit 55212727 authored by Lucas Silva's avatar Lucas Silva Committed by Android (Google) Code Review
Browse files

Merge changes from topics "368056266", "372230926" into main

* changes:
  Fix flickering of the resize frame when resizing
  Only allow vertical resizing if it's supported by the widget
parents 42738be4 3b441008
Loading
Loading
Loading
Loading
+48 −3
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui.communal.ui.compose

import android.appwidget.AppWidgetProviderInfo
import android.content.Context
import android.content.res.Configuration
import android.graphics.drawable.Icon
@@ -183,6 +184,9 @@ import com.android.systemui.communal.widgets.SmartspaceAppWidgetHostView
import com.android.systemui.communal.widgets.WidgetConfigurator
import com.android.systemui.res.R
import com.android.systemui.statusbar.phone.SystemUIDialogFactory
import kotlin.math.max
import kotlin.math.min
import kotlin.math.roundToInt
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch

@@ -644,11 +648,13 @@ private fun ObserveNewWidgetAddedEffect(
@Composable
private fun ResizableItemFrameWrapper(
    key: String,
    currentSpan: GridItemSpan,
    gridState: LazyGridState,
    minItemSpan: Int,
    gridContentPadding: PaddingValues,
    verticalArrangement: Arrangement.Vertical,
    enabled: Boolean,
    minHeightPx: Int,
    maxHeightPx: Int,
    modifier: Modifier = Modifier,
    alpha: () -> Float = { 1f },
    onResize: (info: ResizeInfo) -> Unit = {},
@@ -659,20 +665,48 @@ private fun ResizableItemFrameWrapper(
    } else {
        ResizableItemFrame(
            key = key,
            currentSpan = currentSpan,
            gridState = gridState,
            minItemSpan = minItemSpan,
            gridContentPadding = gridContentPadding,
            verticalArrangement = verticalArrangement,
            enabled = enabled,
            alpha = alpha,
            modifier = modifier,
            onResize = onResize,
            minHeightPx = minHeightPx,
            maxHeightPx = maxHeightPx,
            resizeMultiple = CommunalContentSize.HALF.span,
        ) {
            content(Modifier)
        }
    }
}

@Composable
fun calculateWidgetSize(item: CommunalContentModel, isResizable: Boolean): WidgetSizeInfo {
    val density = LocalDensity.current

    return if (isResizable && item is CommunalContentModel.WidgetContent.Widget) {
        with(density) {
            val minHeightPx =
                (min(item.providerInfo.minResizeHeight, item.providerInfo.minHeight)
                    .coerceAtLeast(CommunalContentSize.HALF.dp().toPx().roundToInt()))

            val maxHeightPx =
                (if (item.providerInfo.maxResizeHeight > 0) {
                        max(item.providerInfo.maxResizeHeight, item.providerInfo.minHeight)
                    } else {
                        Int.MAX_VALUE
                    })
                    .coerceIn(minHeightPx, CommunalContentSize.FULL.dp().toPx().roundToInt())

            WidgetSizeInfo(minHeightPx, maxHeightPx)
        }
    } else {
        WidgetSizeInfo(0, Int.MAX_VALUE)
    }
}

@OptIn(ExperimentalFoundationApi::class)
@Composable
private fun BoxScope.CommunalHubLazyGrid(
@@ -747,6 +781,12 @@ private fun BoxScope.CommunalHubLazyGrid(
            val size = SizeF(Dimensions.CardWidth.value, item.size.dp().value)
            val selected = item.key == selectedKey.value
            val dpSize = DpSize(size.width.dp, size.height.dp)
            val isResizable =
                if (item is CommunalContentModel.WidgetContent.Widget) {
                    item.providerInfo.resizeMode and AppWidgetProviderInfo.RESIZE_VERTICAL != 0
                } else {
                    false
                }

            if (viewModel.isEditMode && dragDropState != null) {
                val outlineAlpha by
@@ -755,10 +795,11 @@ private fun BoxScope.CommunalHubLazyGrid(
                        animationSpec = spring(stiffness = Spring.StiffnessMediumLow),
                        label = "Widget resizing outline alpha",
                    )
                val widgetSizeInfo = calculateWidgetSize(item, isResizable)
                ResizableItemFrameWrapper(
                    key = item.key,
                    currentSpan = GridItemSpan(item.size.span),
                    gridState = gridState,
                    minItemSpan = CommunalContentSize.HALF.span,
                    gridContentPadding = contentPadding,
                    verticalArrangement = itemArrangement,
                    enabled = selected,
@@ -772,6 +813,8 @@ private fun BoxScope.CommunalHubLazyGrid(
                            )
                        },
                    onResize = { resizeInfo -> contentListState.resize(index, resizeInfo) },
                    minHeightPx = widgetSizeInfo.minHeightPx,
                    maxHeightPx = widgetSizeInfo.maxHeightPx,
                ) { modifier ->
                    DraggableItem(
                        modifier = modifier,
@@ -1656,6 +1699,8 @@ class Dimensions(val context: Context, val config: Configuration) {
    }
}

data class WidgetSizeInfo(val minHeightPx: Int, val maxHeightPx: Int)

private object Colors {
    val DisabledColorFilter by lazy { disabledColorMatrix() }

+32 −17
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.lazy.grid.GridItemSpan
import androidx.compose.foundation.lazy.grid.LazyGridState
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
@@ -60,9 +61,12 @@ private fun UpdateGridLayoutInfo(
    viewModel: ResizeableItemFrameViewModel,
    key: String,
    gridState: LazyGridState,
    minItemSpan: Int,
    gridContentPadding: PaddingValues,
    verticalArrangement: Arrangement.Vertical,
    minHeightPx: Int,
    maxHeightPx: Int,
    resizeMultiple: Int,
    currentSpan: GridItemSpan,
) {
    val density = LocalDensity.current
    LaunchedEffect(
@@ -70,9 +74,12 @@ private fun UpdateGridLayoutInfo(
        viewModel,
        key,
        gridState,
        minItemSpan,
        gridContentPadding,
        verticalArrangement,
        minHeightPx,
        maxHeightPx,
        resizeMultiple,
        currentSpan,
    ) {
        val verticalItemSpacingPx = with(density) { verticalArrangement.spacing.toPx() }
        val verticalContentPaddingPx =
@@ -92,13 +99,15 @@ private fun UpdateGridLayoutInfo(
            )
            .collectLatest { (maxItemSpan, viewportHeightPx, itemInfo) ->
                viewModel.setGridLayoutInfo(
                    verticalItemSpacingPx,
                    verticalContentPaddingPx,
                    viewportHeightPx,
                    maxItemSpan,
                    minItemSpan,
                    itemInfo?.row,
                    itemInfo?.span,
                    verticalItemSpacingPx = verticalItemSpacingPx,
                    currentRow = itemInfo?.row,
                    maxHeightPx = maxHeightPx,
                    minHeightPx = minHeightPx,
                    currentSpan = currentSpan.currentLineSpan,
                    resizeMultiple = resizeMultiple,
                    totalSpans = maxItemSpan,
                    viewportHeightPx = viewportHeightPx,
                    verticalContentPaddingPx = verticalContentPaddingPx,
                )
            }
    }
@@ -162,8 +171,8 @@ private fun BoxScope.DragHandle(
@Composable
fun ResizableItemFrame(
    key: String,
    currentSpan: GridItemSpan,
    gridState: LazyGridState,
    minItemSpan: Int,
    gridContentPadding: PaddingValues,
    verticalArrangement: Arrangement.Vertical,
    modifier: Modifier = Modifier,
@@ -172,6 +181,9 @@ fun ResizableItemFrame(
    outlineColor: Color = MaterialTheme.colorScheme.primary,
    cornerRadius: Dp = 37.dp,
    strokeWidth: Dp = 3.dp,
    minHeightPx: Int = 0,
    maxHeightPx: Int = Int.MAX_VALUE,
    resizeMultiple: Int = 1,
    alpha: () -> Float = { 1f },
    onResize: (info: ResizeInfo) -> Unit = {},
    content: @Composable () -> Unit,
@@ -179,7 +191,7 @@ fun ResizableItemFrame(
    val brush = SolidColor(outlineColor)
    val onResizeUpdated by rememberUpdatedState(onResize)
    val viewModel =
        rememberViewModel(traceName = "ResizeableItemFrame.viewModel") {
        rememberViewModel(key = currentSpan, traceName = "ResizeableItemFrame.viewModel") {
            ResizeableItemFrameViewModel()
        }

@@ -230,12 +242,15 @@ fun ResizableItemFrame(
            }

            UpdateGridLayoutInfo(
                viewModel,
                key,
                gridState,
                minItemSpan,
                gridContentPadding,
                verticalArrangement,
                viewModel = viewModel,
                key = key,
                gridState = gridState,
                currentSpan = currentSpan,
                gridContentPadding = gridContentPadding,
                verticalArrangement = verticalArrangement,
                minHeightPx = minHeightPx,
                maxHeightPx = maxHeightPx,
                resizeMultiple = resizeMultiple,
            )
            LaunchedEffect(viewModel) {
                viewModel.resizeInfo.collectLatest { info -> onResizeUpdated(info) }
+138 −49
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import com.android.systemui.kosmos.testScope
import com.android.systemui.lifecycle.activateIn
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import kotlin.time.Duration
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runCurrent
@@ -53,10 +52,12 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
            verticalItemSpacingPx = 10f,
            verticalContentPaddingPx = verticalContentPaddingPx,
            viewportHeightPx = viewportHeightPx,
            maxItemSpan = 1,
            minItemSpan = 1,
            currentSpan = 1,
            currentRow = 0,
            currentSpan = 1,
            maxHeightPx = Int.MAX_VALUE,
            minHeightPx = 0,
            resizeMultiple = 1,
            totalSpans = 1,
        )

    @Before
@@ -79,7 +80,7 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {

    @Test
    fun testSingleSpanGrid() =
        testScope.runTest(timeout = Duration.INFINITE) {
        testScope.runTest {
            updateGridLayout(singleSpanGrid)

            val topState = underTest.topDragState
@@ -98,8 +99,7 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
    @Test
    fun testTwoSpanGrid_elementInFirstRow_sizeSingleSpan() =
        testScope.runTest {
            updateGridLayout(singleSpanGrid.copy(maxItemSpan = 2))

            updateGridLayout(singleSpanGrid.copy(currentRow = 0, totalSpans = 2))
            val topState = underTest.topDragState
            assertThat(topState.currentValue).isEqualTo(0)
            assertThat(topState.anchors.toList()).containsExactly(0 to 0f)
@@ -116,8 +116,7 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
    @Test
    fun testTwoSpanGrid_elementInSecondRow_sizeSingleSpan() =
        testScope.runTest {
            updateGridLayout(singleSpanGrid.copy(maxItemSpan = 2, currentRow = 1))

            updateGridLayout(singleSpanGrid.copy(currentRow = 1, totalSpans = 2))
            val topState = underTest.topDragState
            assertThat(topState.currentValue).isEqualTo(0)
            assertThat(topState.anchors.toList()).containsExactly(0 to 0f, -1 to -45f)
@@ -134,15 +133,17 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
    @Test
    fun testTwoSpanGrid_elementInFirstRow_sizeTwoSpan() =
        testScope.runTest {
            updateGridLayout(singleSpanGrid.copy(maxItemSpan = 2, currentSpan = 2))
            val adjustedGridLayout = singleSpanGrid.copy(currentSpan = 2, totalSpans = 2)

            updateGridLayout(adjustedGridLayout)

            val topState = underTest.topDragState
            assertThat(topState.currentValue).isEqualTo(0)
            assertThat(topState.anchors.toList()).containsExactly(0 to 0f)
            assertThat(topState.currentValue).isEqualTo(0)

            val bottomState = underTest.bottomDragState
            assertThat(bottomState.anchors.toList()).containsExactly(-1 to -45f, 0 to 0f)
            assertThat(bottomState.currentValue).isEqualTo(0)
            assertThat(bottomState.anchors.toList()).containsExactly(0 to 0f, -1 to -45f)
        }

    /**
@@ -151,7 +152,10 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
    @Test
    fun testThreeSpanGrid_elementInMiddleRow_sizeOneSpan() =
        testScope.runTest {
            updateGridLayout(singleSpanGrid.copy(maxItemSpan = 3, currentRow = 1))
            val adjustedGridLayout =
                singleSpanGrid.copy(currentRow = 1, currentSpan = 1, totalSpans = 3)

            updateGridLayout(adjustedGridLayout)

            val topState = underTest.topDragState
            assertThat(topState.currentValue).isEqualTo(0)
@@ -165,7 +169,10 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
    @Test
    fun testThreeSpanGrid_elementInTopRow_sizeOneSpan() =
        testScope.runTest {
            updateGridLayout(singleSpanGrid.copy(maxItemSpan = 3))
            val adjustedGridLayout =
                singleSpanGrid.copy(currentRow = 0, currentSpan = 1, totalSpans = 3)

            updateGridLayout(adjustedGridLayout)

            val topState = underTest.topDragState
            assertThat(topState.currentValue).isEqualTo(0)
@@ -177,17 +184,18 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
        }

    @Test
    fun testSixSpanGrid_minSpanThree_itemInThirdRow_sizeThreeSpans() =
    fun testSixSpanGrid_minSpanThree_itemInFourthRow_sizeThreeSpans() =
        testScope.runTest {
            updateGridLayout(
            val adjustedGridLayout =
                singleSpanGrid.copy(
                    maxItemSpan = 6,
                    currentRow = 3,
                    currentSpan = 3,
                    minItemSpan = 3,
                )
                    resizeMultiple = 3,
                    totalSpans = 6,
                )

            updateGridLayout(adjustedGridLayout)

            val topState = underTest.topDragState
            assertThat(topState.currentValue).isEqualTo(0)
            assertThat(topState.anchors.toList()).containsExactly(0 to 0f, -3 to -45f)
@@ -200,7 +208,14 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
    @Test
    fun testTwoSpanGrid_elementMovesFromFirstRowToSecondRow() =
        testScope.runTest {
            updateGridLayout(singleSpanGrid.copy(maxItemSpan = 2))
            val firstRowLayout =
                singleSpanGrid.copy(
                    currentRow = 0,
                    currentSpan = 1,
                    resizeMultiple = 1,
                    totalSpans = 2,
                )
            updateGridLayout(firstRowLayout)

            val topState = underTest.topDragState
            val bottomState = underTest.bottomDragState
@@ -208,7 +223,8 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
            assertThat(topState.anchors.toList()).containsExactly(0 to 0f)
            assertThat(bottomState.anchors.toList()).containsExactly(0 to 0f, 1 to 45f)

            updateGridLayout(singleSpanGrid.copy(maxItemSpan = 2, currentRow = 1))
            val secondRowLayout = firstRowLayout.copy(currentRow = 1)
            updateGridLayout(secondRowLayout)

            assertThat(topState.anchors.toList()).containsExactly(0 to 0f, -1 to -45f)
            assertThat(bottomState.anchors.toList()).containsExactly(0 to 0f)
@@ -217,19 +233,21 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
    @Test
    fun testTwoSpanGrid_expandElementFromBottom() = runTestWithSnapshots {
        val resizeInfo by collectLastValue(underTest.resizeInfo)
        updateGridLayout(singleSpanGrid.copy(maxItemSpan = 2))

        assertThat(resizeInfo).isNull()
        val adjustedGridLayout = singleSpanGrid.copy(resizeMultiple = 1, totalSpans = 2)

        updateGridLayout(adjustedGridLayout)

        underTest.bottomDragState.anchoredDrag { dragTo(45f) }

        assertThat(resizeInfo).isEqualTo(ResizeInfo(1, DragHandle.BOTTOM))
    }

    @Test
    fun testThreeSpanGrid_expandMiddleElementUpwards() = runTestWithSnapshots {
        val resizeInfo by collectLastValue(underTest.resizeInfo)
        updateGridLayout(singleSpanGrid.copy(maxItemSpan = 3, currentRow = 1))
        updateGridLayout(singleSpanGrid.copy(currentRow = 1, totalSpans = 3))

        assertThat(resizeInfo).isNull()
        underTest.topDragState.anchoredDrag { dragTo(-30f) }
        assertThat(resizeInfo).isEqualTo(ResizeInfo(1, DragHandle.TOP))
    }
@@ -237,7 +255,7 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
    @Test
    fun testThreeSpanGrid_expandTopElementDownBy2Spans() = runTestWithSnapshots {
        val resizeInfo by collectLastValue(underTest.resizeInfo)
        updateGridLayout(singleSpanGrid.copy(maxItemSpan = 3))
        updateGridLayout(singleSpanGrid.copy(totalSpans = 3))

        assertThat(resizeInfo).isNull()
        underTest.bottomDragState.anchoredDrag { dragTo(60f) }
@@ -247,7 +265,7 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
    @Test
    fun testTwoSpanGrid_shrinkElementFromBottom() = runTestWithSnapshots {
        val resizeInfo by collectLastValue(underTest.resizeInfo)
        updateGridLayout(singleSpanGrid.copy(maxItemSpan = 2, currentSpan = 2))
        updateGridLayout(singleSpanGrid.copy(totalSpans = 2, currentSpan = 2))

        assertThat(resizeInfo).isNull()
        underTest.bottomDragState.anchoredDrag { dragTo(-45f) }
@@ -257,7 +275,7 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
    @Test
    fun testRowInfoBecomesNull_revertsBackToDefault() =
        testScope.runTest {
            val gridLayout = singleSpanGrid.copy(maxItemSpan = 3, currentRow = 1)
            val gridLayout = singleSpanGrid.copy(currentRow = 1, resizeMultiple = 1, totalSpans = 3)
            updateGridLayout(gridLayout)

            val topState = underTest.topDragState
@@ -266,44 +284,113 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
            val bottomState = underTest.bottomDragState
            assertThat(bottomState.anchors.toList()).containsExactly(0 to 0f, 1 to 30f)

            // Set currentRow to null to simulate the row info becoming null
            updateGridLayout(gridLayout.copy(currentRow = null))
            assertThat(topState.anchors.toList()).containsExactly(0 to 0f)
            assertThat(bottomState.anchors.toList()).containsExactly(0 to 0f)
        }

    @Test(expected = IllegalArgumentException::class)
    fun testIllegalState_maxSpanSmallerThanMinSpan() =
    @Test
    fun testEqualMaxAndMinHeight_cannotResize() =
        testScope.runTest {
            updateGridLayout(singleSpanGrid.copy(maxItemSpan = 2, minItemSpan = 3))
            val heightPx = 20
            updateGridLayout(
                singleSpanGrid.copy(maxHeightPx = heightPx, minHeightPx = heightPx, totalSpans = 2)
            )

            val topState = underTest.topDragState
            val bottomState = underTest.bottomDragState

            assertThat(topState.anchors.toList()).containsExactly(0 to 0f)
            assertThat(bottomState.anchors.toList()).containsExactly(0 to 0f)
        }

    @Test(expected = IllegalArgumentException::class)
    fun testIllegalState_minSpanOfZero() =
    @Test
    fun testMinHeightTwoRows_canExpandButNotShrink() =
        testScope.runTest {
            updateGridLayout(singleSpanGrid.copy(maxItemSpan = 2, minItemSpan = 0))
            val threeRowGrid =
                singleSpanGrid.copy(
                    maxHeightPx = 80,
                    minHeightPx = 50,
                    totalSpans = 3,
                    currentSpan = 2,
                    currentRow = 0,
                )

            updateGridLayout(threeRowGrid)

            val topState = underTest.topDragState
            val bottomState = underTest.bottomDragState
            assertThat(topState.anchors.toList()).containsExactly(0 to 0f)
            assertThat(bottomState.anchors.toList()).containsAtLeast(0 to 0f, 1 to 30f)
        }

    @Test(expected = IllegalArgumentException::class)
    fun testIllegalState_maxSpanOfZero() =
    @Test
    fun testMaxHeightTwoRows_canShrinkButNotExpand() =
        testScope.runTest {
            updateGridLayout(singleSpanGrid.copy(maxItemSpan = 0, minItemSpan = 0))
            val threeRowGrid =
                singleSpanGrid.copy(
                    maxHeightPx = 50,
                    minHeightPx = 20,
                    totalSpans = 3,
                    currentSpan = 2,
                    currentRow = 0,
                )

            updateGridLayout(threeRowGrid)

            val topState = underTest.topDragState
            val bottomState = underTest.bottomDragState

            assertThat(bottomState.anchors.toList()).containsExactly(0 to 0f, -1 to -30f)

            assertThat(topState.anchors.toList()).containsExactly(0 to 0f)
        }

    @Test
    fun testMinHeightEqualToAvailableSpan_cannotResize() =
        testScope.runTest {
            val twoRowGrid =
                singleSpanGrid.copy(
                    minHeightPx = (viewportHeightPx - verticalContentPaddingPx.toInt()),
                    totalSpans = 2,
                    currentSpan = 2,
                )

            updateGridLayout(twoRowGrid)

            val topState = underTest.topDragState
            val bottomState = underTest.bottomDragState

            assertThat(topState.anchors.toList()).containsExactly(0 to 0f)
            assertThat(bottomState.anchors.toList()).containsExactly(0 to 0f)
        }

    @Test(expected = IllegalArgumentException::class)
    fun testIllegalState_currentRowNotMultipleOfMinSpan() =
    fun testIllegalState_maxHeightLessThanMinHeight() =
        testScope.runTest {
            updateGridLayout(singleSpanGrid.copy(maxItemSpan = 6, minItemSpan = 3, currentSpan = 2))
            updateGridLayout(singleSpanGrid.copy(maxHeightPx = 50, minHeightPx = 100))
        }

    @Test(expected = IllegalArgumentException::class)
    fun testIllegalState_currentSpanExceedsTotalSpans() =
        testScope.runTest { updateGridLayout(singleSpanGrid.copy(currentSpan = 3, totalSpans = 2)) }

    @Test(expected = IllegalArgumentException::class)
    fun testIllegalState_resizeMultipleZeroOrNegative() =
        testScope.runTest { updateGridLayout(singleSpanGrid.copy(resizeMultiple = 0)) }

    private fun TestScope.updateGridLayout(gridLayout: GridLayout) {
        underTest.setGridLayoutInfo(
            gridLayout.verticalItemSpacingPx,
            gridLayout.verticalContentPaddingPx,
            gridLayout.viewportHeightPx,
            gridLayout.maxItemSpan,
            gridLayout.minItemSpan,
            gridLayout.currentRow,
            gridLayout.currentSpan,
            verticalItemSpacingPx = gridLayout.verticalItemSpacingPx,
            currentRow = gridLayout.currentRow,
            maxHeightPx = gridLayout.maxHeightPx,
            minHeightPx = gridLayout.minHeightPx,
            currentSpan = gridLayout.currentSpan,
            resizeMultiple = gridLayout.resizeMultiple,
            totalSpans = gridLayout.totalSpans,
            viewportHeightPx = gridLayout.viewportHeightPx,
            verticalContentPaddingPx = gridLayout.verticalContentPaddingPx,
        )
        runCurrent()
    }
@@ -332,9 +419,11 @@ class ResizeableItemFrameViewModelTest : SysuiTestCase() {
        val verticalItemSpacingPx: Float,
        val verticalContentPaddingPx: Float,
        val viewportHeightPx: Int,
        val maxItemSpan: Int,
        val minItemSpan: Int,
        val currentRow: Int?,
        val currentSpan: Int?,
        val currentSpan: Int,
        val maxHeightPx: Int,
        val minHeightPx: Int,
        val resizeMultiple: Int,
        val totalSpans: Int,
    )
}
+66 −41

File changed.

Preview size limit exceeded, changes collapsed.