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

Commit 68c52490 authored by Beth Thibodeau's avatar Beth Thibodeau
Browse files

Fix media vertical cut off in scene container

Bug: 329663589
Test: manual - check with flag off (full height) and on (no change)
Flag: ACONFIG com.android.systemui.media_in_scene_container DEVELOPMENT
Change-Id: I9d45074d105f66325e2b05eb707a2cc5563a85d9
parent e68cb4e0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -53,6 +53,11 @@ fun SceneScope.MediaCarousel(
                val mediaFrame = carouselController.mediaFrame
                (mediaFrame.parent as? ViewGroup)?.removeView(mediaFrame)
                addView(mediaFrame)
                layoutParams =
                    FrameLayout.LayoutParams(
                        FrameLayout.LayoutParams.MATCH_PARENT,
                        FrameLayout.LayoutParams.MATCH_PARENT,
                    )
            }
        },
        update = {
+2 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_height="match_parent"
    android:clipChildren="false"
    android:clipToPadding="false"
    android:forceHasOverlappingRendering="false"
@@ -27,7 +27,7 @@
    <com.android.systemui.media.controls.ui.view.MediaScrollView
        android:id="@+id/media_carousel_scroller"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_height="match_parent"
        android:scrollbars="none"
        android:clipChildren="false"
        android:clipToPadding="false"
+6 −0
Original line number Diff line number Diff line
@@ -656,8 +656,14 @@ constructor(
        if (width == widthInSceneContainerPx && height == heightInSceneContainerPx) {
            return
        }
        if (width <= 0 || height <= 0) {
            // reject as invalid
            return
        }
        widthInSceneContainerPx = width
        heightInSceneContainerPx = height
        mediaCarouselScrollHandler.playerWidthPlusPadding =
            width + context.resources.getDimensionPixelSize(R.dimen.qs_media_padding)
        updatePlayers(recreateMedia = true)
    }