diff options
author | 2024-08-12 19:14:19 +0000 | |
---|---|---|
committer | 2024-08-12 19:14:19 +0000 | |
commit | 397b9ed71baf751bfee58342edf1cbdcb381e077 (patch) | |
tree | 1700734cda5f797a4670af7f6ce6bce83cdc1b17 | |
parent | dd0a5739dfac4fc7329bc0cc8af19e9fe9fe4912 (diff) | |
parent | 1e01da69e49716cb283598a0fd3d6f83d99b4522 (diff) |
Merge "[flexiglass] Use actual media host locations" into main
3 files changed, 0 insertions, 12 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaCarousel.kt b/packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaCarousel.kt index 85d5d6a41965..808e6666e6e6 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaCarousel.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaCarousel.kt @@ -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(), diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt index c5d7b25827ea..46c5c188344e 100644 --- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt +++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt @@ -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) } diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManager.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManager.kt index 88a28bf998da..091b886c7ba4 100644 --- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManager.kt +++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManager.kt @@ -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 |