Loading packages/SystemUI/Android.bp +38 −0 Original line number Diff line number Diff line Loading @@ -319,6 +319,8 @@ filegroup { "tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImplTest.kt", "tests/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractorImplTest.kt", "tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModelTest.kt", "tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconsInteractor.kt", "tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt", /* Bouncer UI tests */ "tests/src/com/android/keyguard/KeyguardPasswordViewControllerTest.kt", Loading Loading @@ -365,6 +367,42 @@ filegroup { "tests/src/com/android/systemui/qs/pipeline/shared/TileSpecTest.kt", "tests/src/com/android/systemui/qs/tiles/base/**/*.kt", "tests/src/com/android/systemui/qs/tiles/viewmodel/**/*.kt", /* Authentication */ "tests/src/com/android/systemui/authentication/data/repository/AuthenticationRepositoryTest.kt", "tests/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractorTest.kt", /* Device entry */ "tests/src/com/android/systemui/deviceentry/data/repository/DeviceEntryRepositoryTest.kt", "tests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt", /* Bouncer scene */ "tests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt", "tests/src/com/android/systemui/bouncer/ui/viewmodel/AuthMethodBouncerViewModelTest.kt", "tests/src/com/android/systemui/bouncer/ui/viewmodel/BouncerViewModelTest.kt", "tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt", "tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt", "tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt", "tests/src/com/android/systemui/bouncer/ui/viewmodel/PinInputViewModelTest.kt", /* Lockscreen scene */ "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModelTest.kt", /* Shade scene */ "tests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt", "tests/src/com/android/systemui/shade/ui/viewmodel/ShadeHeaderViewModelTest.kt", /* Quick Settings scene */ "tests/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModelTest.kt", /* Flexiglass / Scene framework tests */ "tests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt", "tests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt", "tests/src/com/android/systemui/scene/data/repository/WindowRootViewVisibilityRepositoryTest.kt", "tests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt", "tests/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractorTest.kt", "tests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt", "tests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt", ], path: "tests/src", } Loading packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PinInputViewModel.kt +4 −8 Original line number Diff line number Diff line Loading @@ -35,10 +35,8 @@ import com.android.systemui.bouncer.ui.viewmodel.EntryToken.Digit * The input is guaranteed to always contain a initial [ClearAll] token as a sentinel, thus clients * can always assume there is a 'ClearAll' watermark available. */ data class PinInputViewModel internal constructor( @get:VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) internal val input: List<EntryToken> data class PinInputViewModel( @get:VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) val input: List<EntryToken> ) { init { require(input.firstOrNull() is ClearAll) { "input does not begin with a ClearAll token" } Loading Loading @@ -132,8 +130,7 @@ sealed interface EntryToken : Comparable<EntryToken> { val sequenceNumber: Int /** The pin bouncer [input] as digits 0-9. */ data class Digit internal constructor(val input: Int, override val sequenceNumber: Int = nextSequenceNumber++) : data class Digit(val input: Int, override val sequenceNumber: Int = nextSequenceNumber++) : EntryToken { init { check(input in 0..9) Loading @@ -144,8 +141,7 @@ sealed interface EntryToken : Comparable<EntryToken> { * Marker to indicate the input is completely cleared, and subsequent [EntryToken]s mark a new * pin entry. */ data class ClearAll internal constructor(override val sequenceNumber: Int = nextSequenceNumber++) : EntryToken data class ClearAll(override val sequenceNumber: Int = nextSequenceNumber++) : EntryToken override fun compareTo(other: EntryToken): Int = compareValuesBy(this, other, EntryToken::sequenceNumber) Loading packages/SystemUI/tests/src/com/android/systemui/authentication/data/repository/AuthenticationRepositoryTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ package com.android.systemui.authentication.data.repository import android.app.admin.DevicePolicyManager import android.content.Intent import android.content.pm.UserInfo import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.internal.widget.LockPatternUtils import com.android.keyguard.KeyguardSecurityModel Loading @@ -40,13 +41,12 @@ import kotlinx.coroutines.test.runTest import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 import org.mockito.ArgumentMatchers.anyInt import org.mockito.Mock import org.mockito.MockitoAnnotations @SmallTest @RunWith(JUnit4::class) @RunWith(AndroidJUnit4::class) class AuthenticationRepositoryTest : SysuiTestCase() { @Mock private lateinit var lockPatternUtils: LockPatternUtils Loading packages/SystemUI/tests/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractorTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.authentication.domain.interactor import android.app.admin.DevicePolicyManager import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.authentication.data.model.AuthenticationMethodModel as DataLayerAuthenticationMethodModel Loading @@ -35,11 +36,10 @@ import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @RunWith(JUnit4::class) @RunWith(AndroidJUnit4::class) class AuthenticationInteractorTest : SysuiTestCase() { private val utils = SceneTestUtils(this) Loading packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.bouncer.domain.interactor import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.authentication.data.model.AuthenticationMethodModel Loading @@ -38,11 +39,10 @@ import kotlinx.coroutines.test.runTest import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @RunWith(JUnit4::class) @RunWith(AndroidJUnit4::class) class BouncerInteractorTest : SysuiTestCase() { private val utils = SceneTestUtils(this) Loading Loading
packages/SystemUI/Android.bp +38 −0 Original line number Diff line number Diff line Loading @@ -319,6 +319,8 @@ filegroup { "tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImplTest.kt", "tests/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractorImplTest.kt", "tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModelTest.kt", "tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconsInteractor.kt", "tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt", /* Bouncer UI tests */ "tests/src/com/android/keyguard/KeyguardPasswordViewControllerTest.kt", Loading Loading @@ -365,6 +367,42 @@ filegroup { "tests/src/com/android/systemui/qs/pipeline/shared/TileSpecTest.kt", "tests/src/com/android/systemui/qs/tiles/base/**/*.kt", "tests/src/com/android/systemui/qs/tiles/viewmodel/**/*.kt", /* Authentication */ "tests/src/com/android/systemui/authentication/data/repository/AuthenticationRepositoryTest.kt", "tests/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractorTest.kt", /* Device entry */ "tests/src/com/android/systemui/deviceentry/data/repository/DeviceEntryRepositoryTest.kt", "tests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt", /* Bouncer scene */ "tests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt", "tests/src/com/android/systemui/bouncer/ui/viewmodel/AuthMethodBouncerViewModelTest.kt", "tests/src/com/android/systemui/bouncer/ui/viewmodel/BouncerViewModelTest.kt", "tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt", "tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt", "tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt", "tests/src/com/android/systemui/bouncer/ui/viewmodel/PinInputViewModelTest.kt", /* Lockscreen scene */ "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModelTest.kt", /* Shade scene */ "tests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt", "tests/src/com/android/systemui/shade/ui/viewmodel/ShadeHeaderViewModelTest.kt", /* Quick Settings scene */ "tests/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModelTest.kt", /* Flexiglass / Scene framework tests */ "tests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt", "tests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt", "tests/src/com/android/systemui/scene/data/repository/WindowRootViewVisibilityRepositoryTest.kt", "tests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt", "tests/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractorTest.kt", "tests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt", "tests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt", ], path: "tests/src", } Loading
packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PinInputViewModel.kt +4 −8 Original line number Diff line number Diff line Loading @@ -35,10 +35,8 @@ import com.android.systemui.bouncer.ui.viewmodel.EntryToken.Digit * The input is guaranteed to always contain a initial [ClearAll] token as a sentinel, thus clients * can always assume there is a 'ClearAll' watermark available. */ data class PinInputViewModel internal constructor( @get:VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) internal val input: List<EntryToken> data class PinInputViewModel( @get:VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) val input: List<EntryToken> ) { init { require(input.firstOrNull() is ClearAll) { "input does not begin with a ClearAll token" } Loading Loading @@ -132,8 +130,7 @@ sealed interface EntryToken : Comparable<EntryToken> { val sequenceNumber: Int /** The pin bouncer [input] as digits 0-9. */ data class Digit internal constructor(val input: Int, override val sequenceNumber: Int = nextSequenceNumber++) : data class Digit(val input: Int, override val sequenceNumber: Int = nextSequenceNumber++) : EntryToken { init { check(input in 0..9) Loading @@ -144,8 +141,7 @@ sealed interface EntryToken : Comparable<EntryToken> { * Marker to indicate the input is completely cleared, and subsequent [EntryToken]s mark a new * pin entry. */ data class ClearAll internal constructor(override val sequenceNumber: Int = nextSequenceNumber++) : EntryToken data class ClearAll(override val sequenceNumber: Int = nextSequenceNumber++) : EntryToken override fun compareTo(other: EntryToken): Int = compareValuesBy(this, other, EntryToken::sequenceNumber) Loading
packages/SystemUI/tests/src/com/android/systemui/authentication/data/repository/AuthenticationRepositoryTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ package com.android.systemui.authentication.data.repository import android.app.admin.DevicePolicyManager import android.content.Intent import android.content.pm.UserInfo import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.internal.widget.LockPatternUtils import com.android.keyguard.KeyguardSecurityModel Loading @@ -40,13 +41,12 @@ import kotlinx.coroutines.test.runTest import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 import org.mockito.ArgumentMatchers.anyInt import org.mockito.Mock import org.mockito.MockitoAnnotations @SmallTest @RunWith(JUnit4::class) @RunWith(AndroidJUnit4::class) class AuthenticationRepositoryTest : SysuiTestCase() { @Mock private lateinit var lockPatternUtils: LockPatternUtils Loading
packages/SystemUI/tests/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractorTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.authentication.domain.interactor import android.app.admin.DevicePolicyManager import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.authentication.data.model.AuthenticationMethodModel as DataLayerAuthenticationMethodModel Loading @@ -35,11 +36,10 @@ import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @RunWith(JUnit4::class) @RunWith(AndroidJUnit4::class) class AuthenticationInteractorTest : SysuiTestCase() { private val utils = SceneTestUtils(this) Loading
packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.bouncer.domain.interactor import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.authentication.data.model.AuthenticationMethodModel Loading @@ -38,11 +39,10 @@ import kotlinx.coroutines.test.runTest import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @RunWith(JUnit4::class) @RunWith(AndroidJUnit4::class) class BouncerInteractorTest : SysuiTestCase() { private val utils = SceneTestUtils(this) Loading