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

Commit 9fbb1d1c authored by Beth Thibodeau's avatar Beth Thibodeau Committed by Android (Google) Code Review
Browse files

Merge "Fix media carousel view size for scene container" into main

parents f04dae13 594bef17
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -983,13 +983,20 @@ constructor(
        val overrideSize = mediaHostStatesManager.carouselSizes[location]
        var overridden = false
        overrideSize?.let {
            // To be safe we're using a maximum here. The override size should always be set
            // properly though.
            if (
            if (SceneContainerFlag.isEnabled) {
                result.measureWidth = widthInSceneContainerPx
                result.measureHeight = heightInSceneContainerPx
                overridden = true
            } else if (
                result.measureHeight != it.measuredHeight || result.measureWidth != it.measuredWidth
            ) {
                // To be safe we're using a maximum here. The override size should always be set
                // properly though.
                result.measureHeight = Math.max(it.measuredHeight, result.measureHeight)
                result.measureWidth = Math.max(it.measuredWidth, result.measureWidth)
                overridden = true
            }
            if (overridden) {
                // The measureHeight and the shown height should both be set to the overridden
                // height
                result.height = result.measureHeight
@@ -1001,7 +1008,6 @@ constructor(
                        state.width = result.width
                    }
                }
                overridden = true
            }
        }
        if (overridden && state != null && state.squishFraction <= 1f) {