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

Commit 92348ba7 authored by Fabián Kozynski's avatar Fabián Kozynski
Browse files

Add resId to ComposeView in QSFragmentCompose

This is the id of the top QS view and what is found from outside of if
(for example NotificationsQuickSettingsContainer).

As this is used to set the paddings for navBar/taskbar, we don't need to
do that from inside the ComposeView.

This fixes e2e tests that needed to verify the presence of that view.

Test: atest PlatformScenarioTests
Flag: com.android.systemui.qs_ui_refactor_compose_fragment
Fixes: 372133683
Fixes: 372065975
Change-Id: I13a1620631bbb46d4625303a61dea0d6df9be1d5
parent 93889333
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -44,15 +44,12 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.foundation.verticalScroll
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
@@ -201,6 +198,7 @@ constructor(
        val context = inflater.context
        val composeView =
            ComposeView(context).apply {
                id = R.id.quick_settings_container
                repeatWhenAttached {
                    repeatOnLifecycle(Lifecycle.State.CREATED) {
                        setViewTreeOnBackPressedDispatcherOwner(
@@ -245,7 +243,6 @@ constructor(
                visible = viewModel.isQsVisible,
                modifier =
                    Modifier.graphicsLayer { alpha = viewModel.viewAlpha }
                        .windowInsetsPadding(WindowInsets.navigationBars)
                        // Clipping before translation to match QSContainerImpl.onDraw
                        .offset {
                            IntOffset(x = 0, y = viewModel.viewTranslationY.fastRoundToInt())