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

Commit 849c4c1b authored by Danny Burakov's avatar Danny Burakov Committed by Android (Google) Code Review
Browse files

Merge "[flexiglass] Make the Bouncer translucent." into main

parents 57f30aa1 48452072
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
@@ -20,15 +20,19 @@ import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.overscroll
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalResources
import androidx.compose.ui.platform.testTag
import com.android.compose.animation.scene.ContentScope
import com.android.compose.animation.scene.ElementKey
import com.android.compose.animation.scene.UserAction
import com.android.compose.animation.scene.UserActionResult
import com.android.internal.R
import com.android.systemui.bouncer.ui.BouncerDialogFactory
import com.android.systemui.bouncer.ui.viewmodel.BouncerOverlayContentViewModel
import com.android.systemui.bouncer.ui.viewmodel.BouncerUserActionsViewModel
@@ -47,6 +51,19 @@ object Bouncer {
        val Content = ElementKey("BouncerContent")
    }

    object Colors {
        val Background: Color
            @Composable
            @ReadOnlyComposable
            get() =
                Color(
                    LocalResources.current.getColor(
                        R.color.surface_effect_0,
                        LocalContext.current.theme,
                    )
                )
    }

    object TestTags {
        const val Root = "bouncer_root"
    }
@@ -90,7 +107,7 @@ private fun ContentScope.BouncerOverlay(
    dialogFactory: BouncerDialogFactory,
    modifier: Modifier = Modifier,
) {
    val backgroundColor = MaterialTheme.colorScheme.surface
    val backgroundColor = Bouncer.Colors.Background

    DisposableEffect(Unit) { onDispose { viewModel.onUiDestroyed() } }