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

Commit d79f47b1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[flexiglass] Adds more to the Dumpable" into main

parents acb120ef ed5e8d33
Loading
Loading
Loading
Loading
+43 −4
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ import com.android.systemui.scene.shared.model.Overlays
import com.android.systemui.scene.shared.model.SceneFamilies
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.domain.interactor.ShadeInteractor
import com.android.systemui.shade.domain.interactor.ShadeModeInteractor
import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.VibratorHelper
@@ -143,6 +144,7 @@ constructor(
    private val msdlPlayer: MSDLPlayer,
    private val disabledContentInteractor: DisabledContentInteractor,
    private val activityTransitionAnimator: ActivityTransitionAnimator,
    private val shadeModeInteractor: ShadeModeInteractor,
) : CoreStartable {
    private val centralSurfaces: CentralSurfaces?
        get() = centralSurfacesOptLazy.get().getOrNull()
@@ -175,13 +177,50 @@ constructor(
        }
    }

    override fun dump(pw: PrintWriter, args: Array<out String>) =
        pw.asIndenting().run {
    override fun dump(pw: PrintWriter, args: Array<out String>) {
        with(pw.asIndenting()) {
            printSection("SceneContainerFlag") {
                printSection("Framework availability") {
                    println("isEnabled", SceneContainerFlag.isEnabled)
                printSection("requirementDescription") {
                    println(SceneContainerFlag.requirementDescription())
                }

                if (!SceneContainerFlag.isEnabled) {
                    return
                }

                printSection("Scene state") {
                    println("currentScene", sceneInteractor.currentScene.value.debugName)
                    println(
                        "currentOverlays",
                        sceneInteractor.currentOverlays.value.joinToString(", ") { overlay ->
                            overlay.debugName
                        },
                    )
                    println("backStack", sceneBackInteractor.backStack.value)
                    println("shadeMode", shadeModeInteractor.shadeMode.value)
                }

                printSection("Authentication state") {
                    println("isKeyguardEnabled", keyguardEnabledInteractor.isKeyguardEnabled.value)
                    println(
                        "isUnlocked",
                        deviceUnlockedInteractor.deviceUnlockStatus.value.isUnlocked,
                    )
                    println("isDeviceEntered", deviceEntryInteractor.isDeviceEntered.value)
                    println(
                        "isFaceAuthEnabledAndEnrolled",
                        faceUnlockInteractor.isFaceAuthEnabledAndEnrolled(),
                    )
                    println("canSwipeToEnter", deviceEntryInteractor.canSwipeToEnter.value)
                }

                printSection("Power state") {
                    println("detailedWakefulness", powerInteractor.detailedWakefulness.value)
                    println("isDozing", keyguardInteractor.isDozing.value)
                    println("isAodAvailable", keyguardInteractor.isAodAvailable.value)
                }
            }
        }
    }

+5 −2
Original line number Diff line number Diff line
@@ -89,8 +89,11 @@ object SceneContainerFlag {
    @JvmStatic
    fun requirementDescription(): String {
        return buildString {
            getAllRequirements().forEach { requirement ->
            getAllRequirements().forEachIndexed { index, requirement ->
                if (index > 0) {
                    append('\n')
                }

                append(if (requirement.isEnabled) "    [MET]" else "[NOT MET]")
                append(" ${requirement.name}")
            }
+2 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import com.android.systemui.scene.session.shared.shadeSessionStorage
import com.android.systemui.scene.shared.logger.sceneLogger
import com.android.systemui.settings.displayTracker
import com.android.systemui.shade.domain.interactor.shadeInteractor
import com.android.systemui.shade.domain.interactor.shadeModeInteractor
import com.android.systemui.statusbar.notification.stack.domain.interactor.headsUpNotificationInteractor
import com.android.systemui.statusbar.notificationShadeWindowController
import com.android.systemui.statusbar.phone.centralSurfacesOptional
@@ -87,5 +88,6 @@ val Kosmos.sceneContainerStartable by Fixture {
        msdlPlayer = msdlPlayer,
        disabledContentInteractor = disabledContentInteractor,
        activityTransitionAnimator = activityTransitionAnimator,
        shadeModeInteractor = shadeModeInteractor,
    )
}