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

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

Merge "[flexiglass] Use actual media host locations" into main

parents dd0a5739 1e01da69
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.approachLayout
import androidx.compose.ui.layout.layout
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.viewinterop.AndroidView
@@ -59,16 +58,8 @@ fun SceneScope.MediaCarousel(
        return
    }

    val density = LocalDensity.current
    val mediaHeight = dimensionResource(R.dimen.qs_media_session_height_expanded)

    val layoutWidth = 0
    val layoutHeight = with(density) { mediaHeight.toPx() }.toInt()

    // Notify controller to size the carousel for the current space
    mediaHost.measurementInput = MeasurementInput(layoutWidth, layoutHeight)
    carouselController.setSceneContainerSize(layoutWidth, layoutHeight)

    MovableElement(
        key = MediaCarousel.Elements.Content,
        modifier = modifier.height(mediaHeight).fillMaxWidth(),
+0 −2
Original line number Diff line number Diff line
@@ -888,8 +888,6 @@ constructor(
        heightInSceneContainerPx = height
        mediaCarouselScrollHandler.playerWidthPlusPadding =
            width + context.resources.getDimensionPixelSize(R.dimen.qs_media_padding)
        mediaContent.minimumWidth = widthInSceneContainerPx
        mediaContent.minimumHeight = heightInSceneContainerPx
        updatePlayers(recreateMedia = true)
    }

+0 −1
Original line number Diff line number Diff line
@@ -1210,7 +1210,6 @@ constructor(
            (onCommunalNotDreaming && qsExpansion == 0.0f) || onCommunalDreamingAndShadeExpanding
        val location =
            when {
                mediaFlags.isSceneContainerEnabled() -> desiredLocation
                dreamOverlayActive && dreamMediaComplicationActive -> LOCATION_DREAM_OVERLAY
                onCommunal -> LOCATION_COMMUNAL_HUB
                (qsExpansion > 0.0f || inSplitShade) && !onLockscreen -> LOCATION_QS