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

Commit 46faf200 authored by William Xiao's avatar William Xiao
Browse files

Address follow-up comments for UMO in hub mode

I missed some comments from ag/25293435, addressing here.

Bug: 308638964
Flag: ACONFIG com.android.systemui.communal_hub DEVELOPMENT
Test: atest CommunalInteractorTest
Change-Id: I87bd922e59ace63d7ce5a2761ac8e94ab1c828b0
parent dc4b512e
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.GridItemSpan
@@ -164,11 +163,7 @@ private fun TutorialContent(modifier: Modifier = Modifier) {
@Composable
private fun Umo(viewModel: CommunalViewModel, modifier: Modifier = Modifier) {
    AndroidView(
        modifier =
            modifier
                .width(Dimensions.CardWidth)
                .height(Dimensions.CardHeightThird)
                .padding(Dimensions.Spacing),
        modifier = modifier,
        factory = {
            viewModel.mediaHost.expansion = MediaHostState.EXPANDED
            viewModel.mediaHost.showsOnlyActiveMedia = false
+1 −0
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ constructor(
    private val umoContent: Flow<List<CommunalContentModel.Umo>> =
        mediaRepository.mediaPlaying.flatMapLatest { mediaPlaying ->
            if (mediaPlaying) {
                // TODO(b/310254801): support HALF and FULL layouts
                flowOf(listOf(CommunalContentModel.Umo(CommunalContentSize.THIRD)))
            } else {
                flowOf(emptyList())
+1 −1
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ class CommunalInteractorTest : SysuiTestCase() {
        }

    @Test
    fun contentOrdering() =
    fun ordering_smartspaceBeforeUmoBeforeWidgets() =
        testScope.runTest {
            tutorialRepository.setTutorialSettingState(HUB_MODE_TUTORIAL_COMPLETED)