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

Commit be92f682 authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

[flexi] Don't run tests for AOD => KeyguardState.Gone on flexi

KeyguardState.GONE is deprecated when the scene container
is enabled. Instead, Scene.Gone is used and transitions
to Scene.Gone is handled in SceneContainerStartable.

Specifically, the legacy KeyguardState.AOD => KeyguardState.GONE
transition is (in STL) Scene.Lockscreen => Scene.Gone
and is handled in SceneContainerStartable#handlePowerState.

Test: atest FromAodTransitionInteractorTest
Flag: TEST_ONLY
Bug: 416716666
Change-Id: Id1785d7890a063378b617dbb4ad848a49c1e9e2d
parent 6129796b
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@ import com.android.systemui.statusbar.domain.interactor.keyguardOcclusionInterac
import com.android.systemui.testKosmos
import com.google.common.truth.Truth
import junit.framework.Assert.assertEquals
import kotlin.time.Duration.Companion.milliseconds
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.test.advanceTimeBy
import kotlinx.coroutines.test.runCurrent
@@ -82,6 +81,7 @@ import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mockito.reset
import kotlin.time.Duration.Companion.milliseconds

@SmallTest
@RunWith(AndroidJUnit4::class)
@@ -317,6 +317,7 @@ class FromAodTransitionInteractorTest : SysuiTestCase() {

    @Test
    @DisableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
    @DisableSceneContainer
    fun testWakeAndUnlock_transitionsToGone_evenIfBouncerShows() =
        testScope.runTest {
            kosmos.fakeKeyguardRepository.setBiometricUnlockState(
@@ -341,6 +342,7 @@ class FromAodTransitionInteractorTest : SysuiTestCase() {

    @Test
    @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
    @DisableSceneContainer
    fun testWakeAndUnlock_transitionsToGone_evenIfBouncerShows_wmStateRefactor() =
        testScope.runTest {
            kosmos.fakeKeyguardRepository.setBiometricUnlockState(
@@ -370,6 +372,7 @@ class FromAodTransitionInteractorTest : SysuiTestCase() {
        }

    @Test
    @DisableSceneContainer
    fun testTransitionToGone_onWakeUpFromAod_dismissibleKeyguard_securityNone() =
        testScope.runTest {
            kosmos.fakeKeyguardRepository.setKeyguardShowing(false)
@@ -385,6 +388,7 @@ class FromAodTransitionInteractorTest : SysuiTestCase() {

    @Test
    @DisableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
    @DisableSceneContainer
    fun testTransitionToGone_onWakeUp_ifPowerButtonGestureDetectedInAod_fromGone() =
        testScope.runTest {
            val isGone by
@@ -487,6 +491,7 @@ class FromAodTransitionInteractorTest : SysuiTestCase() {
    @Test
    @EnableFlags(FLAG_GLANCEABLE_HUB_V2)
    @DisableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
    @DisableSceneContainer
    fun testTransitionToOccluded_onWakeUpFromAod_whenGlanceableHubEnabled() =
        kosmos.runTest {
            setCommunalV2Available(true)
@@ -508,6 +513,7 @@ class FromAodTransitionInteractorTest : SysuiTestCase() {

    /** Regression test for b/348583197. */
    @Test
    @DisableSceneContainer
    fun testTransitionToAod_ifOccludedDuringTransitingToAod_fromGone() =
        testScope.runTest {
            val isGone by
@@ -547,6 +553,7 @@ class FromAodTransitionInteractorTest : SysuiTestCase() {

    /** Regression test for b/348583197. */
    @Test
    @DisableSceneContainer
    fun testTransitionToAod_ifOccludedAfterTransitingToAod_fromGone() =
        testScope.runTest {
            val isGone by