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

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

Merge "[bc25] Render the lockscreen content below the UI in `OverlayShade`." into main

parents 3cf549bd bbedc623
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -19,11 +19,14 @@ package com.android.systemui.scene
import android.view.View
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.keyguard.KeyguardViewConfigurator
import com.android.systemui.keyguard.domain.interactor.KeyguardClockInteractor
import com.android.systemui.keyguard.qualifiers.KeyguardRootView
import com.android.systemui.keyguard.shared.model.LockscreenSceneBlueprint
import com.android.systemui.keyguard.ui.composable.LockscreenContent
import com.android.systemui.keyguard.ui.composable.LockscreenScene
import com.android.systemui.keyguard.ui.composable.LockscreenSceneBlueprintModule
import com.android.systemui.keyguard.ui.composable.blueprint.ComposableLockscreenSceneBlueprint
import com.android.systemui.keyguard.ui.viewmodel.LockscreenContentViewModel
import com.android.systemui.scene.shared.model.Scene
import dagger.Binds
import dagger.Module
@@ -60,5 +63,14 @@ interface LockscreenSceneModule {
        ): Set<LockscreenSceneBlueprint> {
            return blueprints
        }

        @Provides
        fun providesLockscreenContent(
            viewModel: LockscreenContentViewModel,
            blueprints: Set<@JvmSuppressWildcards ComposableLockscreenSceneBlueprint>,
            clockInteractor: KeyguardClockInteractor,
        ): LockscreenContent {
            return LockscreenContent(viewModel, blueprints, clockInteractor)
        }
    }
}
+1 −3
Original line number Diff line number Diff line
@@ -36,9 +36,7 @@ import javax.inject.Inject
 * This is separate from the [LockscreenScene] because it's meant to support usage of this UI from
 * outside the scene container framework.
 */
class LockscreenContent
@Inject
constructor(
class LockscreenContent(
    private val viewModel: LockscreenContentViewModel,
    private val blueprints: Set<@JvmSuppressWildcards ComposableLockscreenSceneBlueprint>,
    private val clockInteractor: KeyguardClockInteractor,
+13 −6
Original line number Diff line number Diff line
@@ -54,12 +54,19 @@ constructor(
        @SuppressLint("InflateParams")
        val view =
            remember(context) {
                LayoutInflater.from(context)
                (LayoutInflater.from(context)
                        .inflate(
                            R.layout.keyguard_status_bar,
                            null,
                            false,
                    ) as KeyguardStatusBarView
                        ) as KeyguardStatusBarView)
                    .also {
                        it.layoutParams =
                            ViewGroup.LayoutParams(
                                ViewGroup.LayoutParams.MATCH_PARENT,
                                ViewGroup.LayoutParams.WRAP_CONTENT
                            )
                    }
            }
        val viewController =
            remember(view) {
+5 −0
Original line number Diff line number Diff line
@@ -26,11 +26,14 @@ import com.android.compose.animation.scene.SceneScope
import com.android.compose.animation.scene.UserAction
import com.android.compose.animation.scene.UserActionResult
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.keyguard.ui.composable.LockscreenContent
import com.android.systemui.notifications.ui.viewmodel.NotificationsShadeSceneViewModel
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.ui.composable.ComposableScene
import com.android.systemui.shade.ui.composable.OverlayShade
import com.android.systemui.shade.ui.viewmodel.OverlayShadeViewModel
import dagger.Lazy
import java.util.Optional
import javax.inject.Inject
import kotlinx.coroutines.flow.StateFlow

@@ -40,6 +43,7 @@ class NotificationsShadeScene
constructor(
    viewModel: NotificationsShadeSceneViewModel,
    private val overlayShadeViewModel: OverlayShadeViewModel,
    private val lockscreenContent: Lazy<Optional<LockscreenContent>>,
) : ComposableScene {

    override val key = Scenes.NotificationsShade
@@ -55,6 +59,7 @@ constructor(
            viewModel = overlayShadeViewModel,
            modifier = modifier,
            horizontalArrangement = Arrangement.Start,
            lockscreenContent = lockscreenContent,
        ) {
            Text(
                text = "Notifications list",
+5 −0
Original line number Diff line number Diff line
@@ -26,13 +26,16 @@ import com.android.compose.animation.scene.SceneScope
import com.android.compose.animation.scene.UserAction
import com.android.compose.animation.scene.UserActionResult
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.keyguard.ui.composable.LockscreenContent
import com.android.systemui.qs.ui.viewmodel.QuickSettingsShadeSceneViewModel
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.ui.composable.ComposableScene
import com.android.systemui.shade.ui.composable.OverlayShade
import com.android.systemui.shade.ui.viewmodel.OverlayShadeViewModel
import dagger.Lazy
import javax.inject.Inject
import kotlinx.coroutines.flow.StateFlow
import java.util.Optional

@SysUISingleton
class QuickSettingsShadeScene
@@ -40,6 +43,7 @@ class QuickSettingsShadeScene
constructor(
    viewModel: QuickSettingsShadeSceneViewModel,
    private val overlayShadeViewModel: OverlayShadeViewModel,
    private val lockscreenContent: Lazy<Optional<LockscreenContent>>,
) : ComposableScene {

    override val key = Scenes.QuickSettingsShade
@@ -55,6 +59,7 @@ constructor(
            viewModel = overlayShadeViewModel,
            modifier = modifier,
            horizontalArrangement = Arrangement.End,
            lockscreenContent = lockscreenContent,
        ) {
            Text(
                text = "Quick settings grid",
Loading