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

Commit 041c6a7b authored by Fabian Kozynski's avatar Fabian Kozynski Committed by Android (Google) Code Review
Browse files

Merge "Avoid media updates due to changing constraints" into main

parents 403e530d 10d0d0cb
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredHeightIn
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
@@ -76,6 +77,7 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.CustomAccessibilityAction
import androidx.compose.ui.semantics.customActions
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.round
@@ -627,7 +629,14 @@ constructor(
                val Media =
                    @Composable {
                        if (viewModel.qqsMediaVisible) {
                            MediaObject(mediaHost = viewModel.qqsMediaHost)
                            MediaObject(
                                // In order to have stable constraints passed to the AndroidView
                                // during expansion (available height changing due to squishiness),
                                // We always allow the media here to be as tall as it wants.
                                // (b/383085298)
                                modifier = Modifier.requiredHeightIn(max = Dp.Infinity),
                                mediaHost = viewModel.qqsMediaHost,
                            )
                        }
                    }