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

Commit 5ba9b8c2 authored by Andreas Miko's avatar Andreas Miko
Browse files

Remove TODOs for b/336581871

I looked through the remaining todos and according to my assessment all
of the changeScenes are good with the default state (LOCKSCREEN).

Bug: 336581871
Flag: DOCS_ONLY
Test: DOCS_ONLY
Change-Id: Ic2ae6dd4115149a8fb0e2002cf11e2ba2f60b7e5
parent 25e8d87e
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@
package com.android.systemui.scene.domain.startable
package com.android.systemui.scene.domain.startable


import android.app.StatusBarManager
import android.app.StatusBarManager
import com.android.app.tracing.coroutines.launchTraced as launch
import com.android.compose.animation.scene.ObservableTransitionState
import com.android.compose.animation.scene.ObservableTransitionState
import com.android.compose.animation.scene.SceneKey
import com.android.compose.animation.scene.SceneKey
import com.android.internal.logging.UiEventLogger
import com.android.internal.logging.UiEventLogger
@@ -102,7 +103,6 @@ import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.mapNotNull
import kotlinx.coroutines.flow.mapNotNull
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.flow.stateIn
import com.android.app.tracing.coroutines.launchTraced as launch


/**
/**
 * Hooks up business logic that manipulates the state of the [SceneInteractor] for the system UI
 * Hooks up business logic that manipulates the state of the [SceneInteractor] for the system UI
@@ -300,7 +300,7 @@ constructor(
            bouncerInteractor.onImeHiddenByUser.collectLatest {
            bouncerInteractor.onImeHiddenByUser.collectLatest {
                if (sceneInteractor.currentScene.value == Scenes.Bouncer) {
                if (sceneInteractor.currentScene.value == Scenes.Bouncer) {
                    sceneInteractor.changeScene(
                    sceneInteractor.changeScene(
                        toScene = Scenes.Lockscreen, // TODO(b/336581871): add sceneState?
                        toScene = Scenes.Lockscreen,
                        loggingReason = "IME hidden",
                        loggingReason = "IME hidden",
                    )
                    )
                }
                }
@@ -318,7 +318,6 @@ constructor(
                    when {
                    when {
                        isAnySimLocked -> {
                        isAnySimLocked -> {
                            switchToScene(
                            switchToScene(
                                // TODO(b/336581871): add sceneState?
                                targetSceneKey = Scenes.Bouncer,
                                targetSceneKey = Scenes.Bouncer,
                                loggingReason = "Need to authenticate locked SIM card.",
                                loggingReason = "Need to authenticate locked SIM card.",
                            )
                            )
@@ -326,7 +325,6 @@ constructor(
                        unlockStatus.isUnlocked &&
                        unlockStatus.isUnlocked &&
                            deviceEntryInteractor.canSwipeToEnter.value == false -> {
                            deviceEntryInteractor.canSwipeToEnter.value == false -> {
                            switchToScene(
                            switchToScene(
                                // TODO(b/336581871): add sceneState?
                                targetSceneKey = Scenes.Gone,
                                targetSceneKey = Scenes.Gone,
                                loggingReason =
                                loggingReason =
                                    "All SIM cards unlocked and device already unlocked and " +
                                    "All SIM cards unlocked and device already unlocked and " +
@@ -335,7 +333,6 @@ constructor(
                        }
                        }
                        else -> {
                        else -> {
                            switchToScene(
                            switchToScene(
                                // TODO(b/336581871): add sceneState?
                                targetSceneKey = Scenes.Lockscreen,
                                targetSceneKey = Scenes.Lockscreen,
                                loggingReason =
                                loggingReason =
                                    "All SIM cards unlocked and device still locked" +
                                    "All SIM cards unlocked and device still locked" +
+1 −2
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.shade
package com.android.systemui.shade


import android.view.MotionEvent
import android.view.MotionEvent
import com.android.app.tracing.coroutines.launchTraced as launch
import com.android.systemui.assist.AssistManager
import com.android.systemui.assist.AssistManager
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.dagger.qualifiers.Background
@@ -39,7 +40,6 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.delay
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.first
import com.android.app.tracing.coroutines.launchTraced as launch
import kotlinx.coroutines.withContext
import kotlinx.coroutines.withContext


/**
/**
@@ -136,7 +136,6 @@ constructor(
    }
    }


    private fun animateCollapseShadeInternal() {
    private fun animateCollapseShadeInternal() {
        // TODO(b/336581871): add sceneState?
        shadeInteractor.collapseEitherShade(
        shadeInteractor.collapseEitherShade(
            loggingReason = "ShadeController.animateCollapseShade",
            loggingReason = "ShadeController.animateCollapseShade",
            transitionKey = SlightlyFasterShadeCollapse,
            transitionKey = SlightlyFasterShadeCollapse,
+0 −1
Original line number Original line Diff line number Diff line
@@ -41,7 +41,6 @@ constructor(
                } else {
                } else {
                    Scenes.Shade
                    Scenes.Shade
                }
                }
            // TODO(b/336581871): add sceneState?
            sceneInteractor.changeScene(key, "animateCollapseQs")
            sceneInteractor.changeScene(key, "animateCollapseQs")
        }
        }
    }
    }