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

Commit 4a8a5b67 authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

Merge changes I9c9627ac,I313a7e6d into main

* changes:
  Add udfps_refactor + refactor_keyguard_dismiss_intent to flexi flags
  Replace classic refactor_keyguard_dismiss_intent flag with aconfig flag
parents dd51de71 aaaf83e8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -209,7 +209,6 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() {

        val keyguardKeyboardInteractor = KeyguardKeyboardInteractor(FakeKeyboardRepository())
        featureFlags = FakeFeatureFlags()
        featureFlags.set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, false)
        featureFlags.set(Flags.LOCKSCREEN_ENABLE_LANDSCAPE, false)

        mSetFlagsRule.enableFlags(
@@ -217,7 +216,8 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() {
        )
        mSetFlagsRule.disableFlags(
            FLAG_SIDEFPS_CONTROLLER_REFACTOR,
            AConfigFlags.FLAG_KEYGUARD_WM_STATE_REFACTOR
            AConfigFlags.FLAG_KEYGUARD_WM_STATE_REFACTOR,
            AConfigFlags.FLAG_REFACTOR_KEYGUARD_DISMISS_INTENT,
        )

        keyguardPasswordViewController =
+8 −4
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith

@@ -45,16 +46,19 @@ import org.junit.runner.RunWith
class AlternateBouncerToGoneTransitionViewModelTest : SysuiTestCase() {
    val kosmos =
        testKosmos().apply {
            fakeFeatureFlagsClassic.apply {
                set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, false)
                set(Flags.FULL_SCREEN_USER_SWITCHER, false)
            }
            fakeFeatureFlagsClassic.apply { set(Flags.FULL_SCREEN_USER_SWITCHER, false) }
        }

    private val testScope = kosmos.testScope
    private val keyguardTransitionRepository = kosmos.fakeKeyguardTransitionRepository
    private val sysuiStatusBarStateController = kosmos.sysuiStatusBarStateController
    private val underTest by lazy { kosmos.alternateBouncerToGoneTransitionViewModel }

    @Before
    fun setup() {
        mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_REFACTOR_KEYGUARD_DISMISS_INTENT)
    }

    @Test
    fun deviceEntryParentViewDisappear() =
        testScope.runTest {
+7 −4
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith

@@ -41,15 +42,17 @@ import org.junit.runner.RunWith
class AlternateBouncerToPrimaryBouncerTransitionViewModelTest : SysuiTestCase() {
    private val kosmos =
        testKosmos().apply {
            fakeFeatureFlagsClassic.apply {
                set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, false)
                set(Flags.FULL_SCREEN_USER_SWITCHER, false)
            }
            fakeFeatureFlagsClassic.apply { set(Flags.FULL_SCREEN_USER_SWITCHER, false) }
        }
    private val testScope = kosmos.testScope
    private val keyguardTransitionRepository by lazy { kosmos.fakeKeyguardTransitionRepository }
    private val underTest by lazy { kosmos.alternateBouncerToPrimaryBouncerTransitionViewModel }

    @Before
    fun setup() {
        mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_REFACTOR_KEYGUARD_DISMISS_INTENT)
    }

    @Test
    fun deviceEntryParentViewDisappear() =
        testScope.runTest {
+2 −4
Original line number Diff line number Diff line
@@ -57,10 +57,7 @@ class BouncerToGoneFlowsTest : SysuiTestCase() {

    private val kosmos =
        testKosmos().apply {
            fakeFeatureFlagsClassic.apply {
                set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, false)
                set(Flags.FULL_SCREEN_USER_SWITCHER, false)
            }
            fakeFeatureFlagsClassic.apply { set(Flags.FULL_SCREEN_USER_SWITCHER, false) }
        }
    private val testScope = kosmos.testScope
    private val keyguardTransitionRepository = kosmos.fakeKeyguardTransitionRepository
@@ -72,6 +69,7 @@ class BouncerToGoneFlowsTest : SysuiTestCase() {
    @Before
    fun setUp() {
        MockitoAnnotations.initMocks(this)
        mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_REFACTOR_KEYGUARD_DISMISS_INTENT)
        whenever(primaryBouncerInteractor.willRunDismissFromKeyguard()).thenReturn(false)
        sysuiStatusBarStateController.setLeaveOpenOnKeyguardHide(false)
    }
+5 −9
Original line number Diff line number Diff line
@@ -30,11 +30,8 @@ import com.android.systemui.communal.data.repository.communalRepository
import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.deviceentry.data.repository.fakeDeviceEntryRepository
import com.android.systemui.flags.Flags
import com.android.systemui.flags.fakeFeatureFlagsClassic
import com.android.systemui.keyguard.data.repository.fakeKeyguardRepository
import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository
import com.android.systemui.keyguard.domain.interactor.keyguardInteractor
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.keyguard.shared.model.TransitionState
import com.android.systemui.keyguard.shared.model.TransitionStep
@@ -60,13 +57,9 @@ import org.junit.runner.RunWith
@SmallTest
@RunWith(AndroidJUnit4::class)
class KeyguardRootViewModelTest : SysuiTestCase() {
    private val kosmos =
        testKosmos().apply {
            fakeFeatureFlagsClassic.apply { set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, false) }
        }
    private val kosmos = testKosmos()
    private val testScope = kosmos.testScope
    private val keyguardTransitionRepository = kosmos.fakeKeyguardTransitionRepository
    private val keyguardInteractor = kosmos.keyguardInteractor
    private val keyguardRepository = kosmos.fakeKeyguardRepository
    private val communalRepository = kosmos.communalRepository
    private val screenOffAnimationController = kosmos.screenOffAnimationController
@@ -82,7 +75,10 @@ class KeyguardRootViewModelTest : SysuiTestCase() {
    fun setUp() {
        mSetFlagsRule.enableFlags(AConfigFlags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR)
        mSetFlagsRule.enableFlags(FLAG_NEW_AOD_TRANSITION)
        mSetFlagsRule.disableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
        mSetFlagsRule.disableFlags(
            AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT,
            AConfigFlags.FLAG_REFACTOR_KEYGUARD_DISMISS_INTENT,
        )
    }

    @Test
Loading