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

Commit 98836f69 authored by Priyanka Advani (xWF)'s avatar Priyanka Advani (xWF) Committed by Android (Google) Code Review
Browse files

Merge "Revert "[Dual Shade] Ensure ShadeMode is never `Dual` outside of SceneContainer."" into main

parents 7c34810b 5e57ebc7
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runCurrent
@@ -45,7 +44,6 @@ import org.junit.runner.RunWith
import platform.test.runner.parameterized.ParameterizedAndroidJunit4
import platform.test.runner.parameterized.Parameters

@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
@RunWith(ParameterizedAndroidJunit4::class)
class CommunalTransitionViewModelTest(flags: FlagsParameterization) : SysuiTestCase() {
@@ -67,7 +65,7 @@ class CommunalTransitionViewModelTest(flags: FlagsParameterization) : SysuiTestC

    private val keyguardTransitionRepository = kosmos.fakeKeyguardTransitionRepository
    private val communalSceneRepository = kosmos.fakeCommunalSceneRepository
    private val sceneInteractor by lazy { kosmos.sceneInteractor }
    private val sceneInteractor = kosmos.sceneInteractor

    private val underTest: CommunalTransitionViewModel by lazy {
        kosmos.communalTransitionViewModel
+6 −13
Original line number Diff line number Diff line
@@ -61,7 +61,6 @@ import com.android.systemui.user.data.model.SelectionStatus
import com.android.systemui.user.data.repository.fakeUserRepository
import com.android.systemui.util.mockito.eq
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.test.TestScope
@@ -74,7 +73,6 @@ import org.mockito.ArgumentMatchers.anyInt
import org.mockito.Mockito.never
import org.mockito.Mockito.verify

@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
@RunWith(AndroidJUnit4::class)
class DeviceEntryFaceAuthInteractorTest : SysuiTestCase() {
@@ -82,26 +80,21 @@ class DeviceEntryFaceAuthInteractorTest : SysuiTestCase() {
    private val testScope: TestScope = kosmos.testScope

    private lateinit var underTest: SystemUIDeviceEntryFaceAuthInteractor

    private val bouncerRepository = kosmos.fakeKeyguardBouncerRepository
    private val keyguardTransitionRepository = kosmos.fakeKeyguardTransitionRepository
    private val keyguardTransitionInteractor = kosmos.keyguardTransitionInteractor
    private val faceAuthRepository = kosmos.fakeDeviceEntryFaceAuthRepository
    private val fakeUserRepository = kosmos.fakeUserRepository
    private val facePropertyRepository = kosmos.facePropertyRepository
    private val fakeDeviceEntryFingerprintAuthInteractor =
        kosmos.deviceEntryFingerprintAuthInteractor
    private val powerInteractor = kosmos.powerInteractor
    private val fakeBiometricSettingsRepository = kosmos.fakeBiometricSettingsRepository

    private val keyguardUpdateMonitor by lazy { kosmos.keyguardUpdateMonitor }
    private val keyguardUpdateMonitor = kosmos.keyguardUpdateMonitor
    private val faceWakeUpTriggersConfig = kosmos.fakeFaceWakeUpTriggersConfig
    private val trustManager = kosmos.trustManager

    private val keyguardTransitionInteractor by lazy { kosmos.keyguardTransitionInteractor }
    private val fakeDeviceEntryFingerprintAuthInteractor by lazy {
        kosmos.deviceEntryFingerprintAuthInteractor
    }
    private val powerInteractor by lazy { kosmos.powerInteractor }
    private val deviceEntryFaceAuthStatusInteractor by lazy {
        kosmos.deviceEntryFaceAuthStatusInteractor
    }
    private val deviceEntryFaceAuthStatusInteractor = kosmos.deviceEntryFaceAuthStatusInteractor

    @Before
    fun setup() {
+2 −5
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@ import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import junit.framework.Assert.assertEquals
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
@@ -54,15 +53,13 @@ import org.junit.Assert.assertThrows
import org.junit.Test
import org.junit.runner.RunWith

@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
@RunWith(AndroidJUnit4::class)
class KeyguardTransitionInteractorTest : SysuiTestCase() {
    val kosmos = testKosmos()
    val testScope = kosmos.testScope
    val underTest = kosmos.keyguardTransitionInteractor
    val repository = kosmos.fakeKeyguardTransitionRepository

    val underTest by lazy { kosmos.keyguardTransitionInteractor }
    val testScope = kosmos.testScope

    @Test
    fun transitionCollectorsReceivesOnlyAppropriateEvents() =
+0 −2
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.systemui.qs.panels.domain.interactor
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.flags.EnableSceneContainer
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.collectLastValue
import com.android.systemui.kosmos.runTest
@@ -35,7 +34,6 @@ import org.junit.runner.RunWith

@SmallTest
@RunWith(AndroidJUnit4::class)
@EnableSceneContainer
class GridLayoutTypeInteractorTest : SysuiTestCase() {
    val kosmos = testKosmos()

+0 −2
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.common.ui.data.repository.configurationRepository
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.flags.EnableSceneContainer
import com.android.systemui.kosmos.testCase
import com.android.systemui.kosmos.testScope
import com.android.systemui.qs.panels.data.repository.QSColumnsRepository
@@ -77,7 +76,6 @@ class QSColumnsInteractorTest : SysuiTestCase() {
        }

    @Test
    @EnableSceneContainer
    fun withDualShade_returnsCorrectValue() =
        with(kosmos) {
            testScope.runTest {
Loading