diff options
| author | 2023-05-15 16:05:54 +0000 | |
|---|---|---|
| committer | 2023-05-15 16:05:54 +0000 | |
| commit | 32becff0571569538e475b00c913d9d2da84ad04 (patch) | |
| tree | 2fed9fe712cf8e4cee9b465f234eb00804aa594b | |
| parent | d28b311abf76b159dcfcc2ad49723211c8f39684 (diff) | |
| parent | 08a0265125ddcc8a89012b88ed229e486809457b (diff) | |
Merge "[flexiglass] Lock screen -> Lockscreen." into udc-dev
17 files changed, 91 insertions, 91 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt index c6c30199a227..6f6d0f97b542 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt @@ -62,7 +62,7 @@ constructor( override fun destinationScenes(): StateFlow<Map<UserAction, SceneModel>> = MutableStateFlow<Map<UserAction, SceneModel>>( mapOf( - UserAction.Back to SceneModel(SceneKey.LockScreen), + UserAction.Back to SceneModel(SceneKey.Lockscreen), ) ) .asStateFlow() diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockScreenScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt index ad33eb518f91..ab7bc26d59e1 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockScreenScene.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt @@ -33,7 +33,7 @@ import com.android.systemui.common.shared.model.Icon import com.android.systemui.common.ui.compose.Icon import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application -import com.android.systemui.keyguard.ui.viewmodel.LockScreenSceneViewModel +import com.android.systemui.keyguard.ui.viewmodel.LockscreenSceneViewModel import com.android.systemui.scene.shared.model.Direction import com.android.systemui.scene.shared.model.SceneKey import com.android.systemui.scene.shared.model.SceneModel @@ -48,13 +48,13 @@ import kotlinx.coroutines.flow.stateIn /** The lock screen scene shows when the device is locked. */ @SysUISingleton -class LockScreenScene +class LockscreenScene @Inject constructor( @Application private val applicationScope: CoroutineScope, - private val viewModel: LockScreenSceneViewModel, + private val viewModel: LockscreenSceneViewModel, ) : ComposableScene { - override val key = SceneKey.LockScreen + override val key = SceneKey.Lockscreen override fun destinationScenes(): StateFlow<Map<UserAction, SceneModel>> = viewModel.upDestinationSceneKey @@ -69,7 +69,7 @@ constructor( override fun Content( modifier: Modifier, ) { - LockScreenScene( + LockscreenScene( viewModel = viewModel, modifier = modifier, ) @@ -86,8 +86,8 @@ constructor( } @Composable -private fun LockScreenScene( - viewModel: LockScreenSceneViewModel, +private fun LockscreenScene( + viewModel: LockscreenSceneViewModel, modifier: Modifier = Modifier, ) { // TODO(b/280879610): implement the real UI. @@ -99,7 +99,7 @@ private fun LockScreenScene( horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier.align(Alignment.Center) ) { - Text("Lock screen", style = MaterialTheme.typography.headlineMedium) + Text("Lockscreen", style = MaterialTheme.typography.headlineMedium) Row( horizontalArrangement = Arrangement.spacedBy(8.dp), ) { diff --git a/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt b/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt index cd195f6f9f97..9d9a87d72e46 100644 --- a/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt @@ -33,7 +33,7 @@ interface AuthenticationRepository { * A device that is not yet unlocked requires unlocking by completing an authentication * challenge according to the current authentication method. * - * Note that this state has no real bearing on whether the lock screen is showing or dismissed. + * Note that this state has no real bearing on whether the lockscreen is showing or dismissed. */ val isUnlocked: StateFlow<Boolean> diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt index 57ce58049f13..8264fed4846a 100644 --- a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt @@ -73,7 +73,7 @@ constructor( is AuthenticationMethodModel.Swipe -> sceneInteractor.setCurrentScene( containerName, - SceneModel(SceneKey.LockScreen), + SceneModel(SceneKey.Lockscreen), ) else -> Unit } diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/LockScreenSceneInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/LockscreenSceneInteractor.kt index 61701802e231..d0bc25fd26f4 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/LockScreenSceneInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/LockscreenSceneInteractor.kt @@ -36,8 +36,8 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.launch -/** Hosts business and application state accessing logic for the lock screen scene. */ -class LockScreenSceneInteractor +/** Hosts business and application state accessing logic for the lockscreen scene. */ +class LockscreenSceneInteractor @AssistedInject constructor( @Application applicationScope: CoroutineScope, @@ -59,7 +59,7 @@ constructor( initialValue = !authenticationInteractor.isUnlocked.value, ) - /** Whether it's currently possible to swipe up to dismiss the lock screen. */ + /** Whether it's currently possible to swipe up to dismiss the lockscreen. */ val isSwipeToDismissEnabled: StateFlow<Boolean> = combine( authenticationInteractor.isUnlocked, @@ -81,9 +81,9 @@ constructor( ) init { - // LOCKING SHOWS LOCK SCREEN. + // LOCKING SHOWS Lockscreen. // - // Move to the lock screen scene if the device becomes locked while in any scene. + // Move to the lockscreen scene if the device becomes locked while in any scene. applicationScope.launch { authenticationInteractor.isUnlocked .map { !it } @@ -92,7 +92,7 @@ constructor( if (isLocked) { sceneInteractor.setCurrentScene( containerName = containerName, - scene = SceneModel(SceneKey.LockScreen), + scene = SceneModel(SceneKey.Lockscreen), ) } } @@ -101,7 +101,7 @@ constructor( // BYPASS UNLOCK. // // Moves to the gone scene if bypass is enabled and the device becomes unlocked while in the - // lock screen scene. + // lockscreen scene. applicationScope.launch { combine( authenticationInteractor.isBypassEnabled, @@ -110,7 +110,7 @@ constructor( ::Triple, ) .collect { (isBypassEnabled, isUnlocked, currentScene) -> - if (isBypassEnabled && isUnlocked && currentScene.key == SceneKey.LockScreen) { + if (isBypassEnabled && isUnlocked && currentScene.key == SceneKey.Lockscreen) { sceneInteractor.setCurrentScene( containerName = containerName, scene = SceneModel(SceneKey.Gone), @@ -119,9 +119,9 @@ constructor( } } - // SWIPE TO DISMISS LOCK SCREEN. + // SWIPE TO DISMISS Lockscreen. // - // If switched from the lock screen to the gone scene and the auth method was a swipe, + // If switched from the lockscreen to the gone scene and the auth method was a swipe, // unlocks the device. applicationScope.launch { combine( @@ -133,7 +133,7 @@ constructor( val (previousScene, currentScene) = scenes if ( authMethod is AuthenticationMethodModel.Swipe && - previousScene.key == SceneKey.LockScreen && + previousScene.key == SceneKey.Lockscreen && currentScene.key == SceneKey.Gone ) { authenticationInteractor.unlockDevice() @@ -141,9 +141,9 @@ constructor( } } - // DISMISS LOCK SCREEN IF AUTH METHOD IS REMOVED. + // DISMISS Lockscreen IF AUTH METHOD IS REMOVED. // - // If the auth method becomes None while on the lock screen scene, dismisses the lock + // If the auth method becomes None while on the lockscreen scene, dismisses the lock // screen. applicationScope.launch { combine( @@ -153,7 +153,7 @@ constructor( ) .collect { (authMethod, scene) -> if ( - scene.key == SceneKey.LockScreen && + scene.key == SceneKey.Lockscreen && authMethod == AuthenticationMethodModel.None ) { sceneInteractor.setCurrentScene( @@ -165,8 +165,8 @@ constructor( } } - /** Attempts to dismiss the lock screen. This will cause the bouncer to show, if needed. */ - fun dismissLockScreen() { + /** Attempts to dismiss the lockscreen. This will cause the bouncer to show, if needed. */ + fun dismissLockscreen() { bouncerInteractor.showOrUnlockDevice(containerName = containerName) } @@ -181,6 +181,6 @@ constructor( interface Factory { fun create( containerName: String, - ): LockScreenSceneInteractor + ): LockscreenSceneInteractor } } diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockScreenSceneViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModel.kt index 08b961306817..f212a553aeb3 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockScreenSceneViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModel.kt @@ -20,7 +20,7 @@ import com.android.systemui.R import com.android.systemui.common.shared.model.ContentDescription import com.android.systemui.common.shared.model.Icon import com.android.systemui.dagger.qualifiers.Application -import com.android.systemui.keyguard.domain.interactor.LockScreenSceneInteractor +import com.android.systemui.keyguard.domain.interactor.LockscreenSceneInteractor import com.android.systemui.scene.shared.model.SceneKey import dagger.assisted.Assisted import dagger.assisted.AssistedFactory @@ -31,17 +31,17 @@ import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.stateIn -/** Models UI state and handles user input for the lock screen scene. */ -class LockScreenSceneViewModel +/** Models UI state and handles user input for the lockscreen scene. */ +class LockscreenSceneViewModel @AssistedInject constructor( @Application applicationScope: CoroutineScope, - interactorFactory: LockScreenSceneInteractor.Factory, + interactorFactory: LockscreenSceneInteractor.Factory, @Assisted containerName: String, ) { - private val interactor: LockScreenSceneInteractor = interactorFactory.create(containerName) + private val interactor: LockscreenSceneInteractor = interactorFactory.create(containerName) - /** The icon for the "lock" button on the lock screen. */ + /** The icon for the "lock" button on the lockscreen. */ val lockButtonIcon: StateFlow<Icon> = interactor.isDeviceLocked .map { isLocked -> lockIcon(isLocked = isLocked) } @@ -63,12 +63,12 @@ constructor( /** Notifies that the lock button on the lock screen was clicked. */ fun onLockButtonClicked() { - interactor.dismissLockScreen() + interactor.dismissLockscreen() } /** Notifies that some content on the lock screen was clicked. */ fun onContentClicked() { - interactor.dismissLockScreen() + interactor.dismissLockscreen() } private fun upDestinationSceneKey( @@ -103,6 +103,6 @@ constructor( interface Factory { fun create( containerName: String, - ): LockScreenSceneViewModel + ): LockscreenSceneViewModel } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModel.kt b/packages/SystemUI/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModel.kt index 6525a98b9102..36dec1d112b9 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModel.kt @@ -16,7 +16,7 @@ package com.android.systemui.qs.ui.viewmodel -import com.android.systemui.keyguard.domain.interactor.LockScreenSceneInteractor +import com.android.systemui.keyguard.domain.interactor.LockscreenSceneInteractor import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject @@ -25,15 +25,15 @@ import dagger.assisted.AssistedInject class QuickSettingsSceneViewModel @AssistedInject constructor( - lockScreenSceneInteractorFactory: LockScreenSceneInteractor.Factory, + lockscreenSceneInteractorFactory: LockscreenSceneInteractor.Factory, @Assisted containerName: String, ) { - private val lockScreenSceneInteractor: LockScreenSceneInteractor = - lockScreenSceneInteractorFactory.create(containerName) + private val lockscreenSceneInteractor: LockscreenSceneInteractor = + lockscreenSceneInteractorFactory.create(containerName) /** Notifies that some content in quick settings was clicked. */ fun onContentClicked() { - lockScreenSceneInteractor.dismissLockScreen() + lockscreenSceneInteractor.dismissLockscreen() } @AssistedFactory diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneKey.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneKey.kt index 9ef439d72118..e7811e39aa6f 100644 --- a/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneKey.kt +++ b/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneKey.kt @@ -32,8 +32,8 @@ sealed class SceneKey( */ object Gone : SceneKey("gone") - /** The lock screen is the scene that shows when the device is locked. */ - object LockScreen : SceneKey("lockscreen") + /** The lockscreen is the scene that shows when the device is locked. */ + object Lockscreen : SceneKey("lockscreen") /** * The shade is the scene whose primary purpose is to show a scrollable list of notifications. diff --git a/packages/SystemUI/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModel.kt b/packages/SystemUI/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModel.kt index dcae258ed76f..8a96a4764e66 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModel.kt @@ -17,7 +17,7 @@ package com.android.systemui.shade.ui.viewmodel import com.android.systemui.dagger.qualifiers.Application -import com.android.systemui.keyguard.domain.interactor.LockScreenSceneInteractor +import com.android.systemui.keyguard.domain.interactor.LockscreenSceneInteractor import com.android.systemui.scene.shared.model.SceneKey import dagger.assisted.Assisted import dagger.assisted.AssistedFactory @@ -33,11 +33,11 @@ class ShadeSceneViewModel @AssistedInject constructor( @Application private val applicationScope: CoroutineScope, - lockScreenSceneInteractorFactory: LockScreenSceneInteractor.Factory, + lockscreenSceneInteractorFactory: LockscreenSceneInteractor.Factory, @Assisted private val containerName: String, ) { - private val lockScreenInteractor: LockScreenSceneInteractor = - lockScreenSceneInteractorFactory.create(containerName) + private val lockScreenInteractor: LockscreenSceneInteractor = + lockscreenSceneInteractorFactory.create(containerName) /** The key of the scene we should switch to when swiping up. */ val upDestinationSceneKey: StateFlow<SceneKey> = @@ -54,13 +54,13 @@ constructor( /** Notifies that some content in the shade was clicked. */ fun onContentClicked() { - lockScreenInteractor.dismissLockScreen() + lockScreenInteractor.dismissLockscreen() } private fun upDestinationSceneKey( isLocked: Boolean, ): SceneKey { - return if (isLocked) SceneKey.LockScreen else SceneKey.Gone + return if (isLocked) SceneKey.Lockscreen else SceneKey.Gone } @AssistedFactory diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/LockScreenSceneInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/LockscreenSceneInteractorTest.kt index c2c528a9babf..d622f1c30816 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/LockScreenSceneInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/LockscreenSceneInteractorTest.kt @@ -36,7 +36,7 @@ import org.junit.runners.JUnit4 @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @RunWith(JUnit4::class) -class LockScreenSceneInteractorTest : SysuiTestCase() { +class LockscreenSceneInteractorTest : SysuiTestCase() { private val testScope = TestScope() private val utils = SceneTestUtils(this, testScope) @@ -96,9 +96,9 @@ class LockScreenSceneInteractorTest : SysuiTestCase() { val currentScene by collectLastValue(sceneInteractor.currentScene(CONTAINER_1)) authenticationInteractor.lockDevice() authenticationInteractor.setAuthenticationMethod(AuthenticationMethodModel.PIN(1234)) - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.LockScreen)) + assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen)) - underTest.dismissLockScreen() + underTest.dismissLockscreen() assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer)) } @@ -109,9 +109,9 @@ class LockScreenSceneInteractorTest : SysuiTestCase() { val currentScene by collectLastValue(sceneInteractor.currentScene(CONTAINER_1)) authenticationInteractor.unlockDevice() authenticationInteractor.setAuthenticationMethod(AuthenticationMethodModel.PIN(1234)) - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.LockScreen)) + assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen)) - underTest.dismissLockScreen() + underTest.dismissLockscreen() assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Gone)) } @@ -122,9 +122,9 @@ class LockScreenSceneInteractorTest : SysuiTestCase() { val currentScene by collectLastValue(sceneInteractor.currentScene(CONTAINER_1)) authenticationInteractor.lockDevice() authenticationInteractor.setAuthenticationMethod(AuthenticationMethodModel.Swipe) - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.LockScreen)) + assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen)) - underTest.dismissLockScreen() + underTest.dismissLockscreen() assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Gone)) } @@ -142,7 +142,7 @@ class LockScreenSceneInteractorTest : SysuiTestCase() { authenticationInteractor.lockDevice() - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.LockScreen)) + assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen)) } @Test @@ -150,11 +150,11 @@ class LockScreenSceneInteractorTest : SysuiTestCase() { testScope.runTest { val currentScene by collectLastValue(sceneInteractor.currentScene(CONTAINER_1)) authenticationInteractor.lockDevice() - sceneInteractor.setCurrentScene(CONTAINER_1, SceneModel(SceneKey.LockScreen)) + sceneInteractor.setCurrentScene(CONTAINER_1, SceneModel(SceneKey.Lockscreen)) if (!authenticationInteractor.isBypassEnabled.value) { authenticationInteractor.toggleBypassEnabled() } - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.LockScreen)) + assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen)) authenticationInteractor.biometricUnlock() @@ -166,22 +166,22 @@ class LockScreenSceneInteractorTest : SysuiTestCase() { testScope.runTest { val currentScene by collectLastValue(sceneInteractor.currentScene(CONTAINER_1)) authenticationInteractor.lockDevice() - sceneInteractor.setCurrentScene(CONTAINER_1, SceneModel(SceneKey.LockScreen)) + sceneInteractor.setCurrentScene(CONTAINER_1, SceneModel(SceneKey.Lockscreen)) if (authenticationInteractor.isBypassEnabled.value) { authenticationInteractor.toggleBypassEnabled() } - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.LockScreen)) + assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen)) authenticationInteractor.biometricUnlock() - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.LockScreen)) + assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen)) } @Test fun switchFromLockScreenToGone_authMethodSwipe_unlocksDevice() = testScope.runTest { val isUnlocked by collectLastValue(authenticationInteractor.isUnlocked) - sceneInteractor.setCurrentScene(CONTAINER_1, SceneModel(SceneKey.LockScreen)) + sceneInteractor.setCurrentScene(CONTAINER_1, SceneModel(SceneKey.Lockscreen)) authenticationInteractor.setAuthenticationMethod(AuthenticationMethodModel.Swipe) assertThat(isUnlocked).isFalse() @@ -194,7 +194,7 @@ class LockScreenSceneInteractorTest : SysuiTestCase() { fun switchFromLockScreenToGone_authMethodNotSwipe_doesNotUnlockDevice() = testScope.runTest { val isUnlocked by collectLastValue(authenticationInteractor.isUnlocked) - sceneInteractor.setCurrentScene(CONTAINER_1, SceneModel(SceneKey.LockScreen)) + sceneInteractor.setCurrentScene(CONTAINER_1, SceneModel(SceneKey.Lockscreen)) authenticationInteractor.setAuthenticationMethod(AuthenticationMethodModel.PIN(1234)) assertThat(isUnlocked).isFalse() @@ -223,9 +223,9 @@ class LockScreenSceneInteractorTest : SysuiTestCase() { fun authMethodChangedToNone_onLockScreenScene_dismissesLockScreen() = testScope.runTest { val currentScene by collectLastValue(sceneInteractor.currentScene(CONTAINER_1)) - sceneInteractor.setCurrentScene(CONTAINER_1, SceneModel(SceneKey.LockScreen)) + sceneInteractor.setCurrentScene(CONTAINER_1, SceneModel(SceneKey.Lockscreen)) authenticationInteractor.setAuthenticationMethod(AuthenticationMethodModel.Swipe) - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.LockScreen)) + assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen)) authenticationInteractor.setAuthenticationMethod(AuthenticationMethodModel.None) diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockScreenSceneViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModelTest.kt index 9e8be3e7608f..8ba3f0f57eed 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockScreenSceneViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModelTest.kt @@ -22,7 +22,7 @@ import com.android.systemui.SysuiTestCase import com.android.systemui.authentication.shared.model.AuthenticationMethodModel import com.android.systemui.common.shared.model.Icon import com.android.systemui.coroutines.collectLastValue -import com.android.systemui.keyguard.domain.interactor.LockScreenSceneInteractor +import com.android.systemui.keyguard.domain.interactor.LockscreenSceneInteractor import com.android.systemui.scene.SceneTestUtils import com.android.systemui.scene.SceneTestUtils.Companion.CONTAINER_1 import com.android.systemui.scene.shared.model.SceneKey @@ -39,7 +39,7 @@ import org.junit.runners.JUnit4 @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @RunWith(JUnit4::class) -class LockScreenSceneViewModelTest : SysuiTestCase() { +class LockscreenSceneViewModelTest : SysuiTestCase() { private val testScope = TestScope() private val utils = SceneTestUtils(this, testScope) @@ -50,11 +50,11 @@ class LockScreenSceneViewModelTest : SysuiTestCase() { ) private val underTest = - LockScreenSceneViewModel( + LockscreenSceneViewModel( applicationScope = testScope.backgroundScope, interactorFactory = - object : LockScreenSceneInteractor.Factory { - override fun create(containerName: String): LockScreenSceneInteractor { + object : LockscreenSceneInteractor.Factory { + override fun create(containerName: String): LockscreenSceneInteractor { return utils.lockScreenSceneInteractor( authenticationInteractor = authenticationInteractor, sceneInteractor = sceneInteractor, diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModelTest.kt index 3f838e6516f1..105387d49bd4 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModelTest.kt @@ -20,7 +20,7 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.authentication.shared.model.AuthenticationMethodModel import com.android.systemui.coroutines.collectLastValue -import com.android.systemui.keyguard.domain.interactor.LockScreenSceneInteractor +import com.android.systemui.keyguard.domain.interactor.LockscreenSceneInteractor import com.android.systemui.scene.SceneTestUtils import com.android.systemui.scene.SceneTestUtils.Companion.CONTAINER_1 import com.android.systemui.scene.shared.model.SceneKey @@ -49,9 +49,9 @@ class QuickSettingsSceneViewModelTest : SysuiTestCase() { private val underTest = QuickSettingsSceneViewModel( - lockScreenSceneInteractorFactory = - object : LockScreenSceneInteractor.Factory { - override fun create(containerName: String): LockScreenSceneInteractor { + lockscreenSceneInteractorFactory = + object : LockscreenSceneInteractor.Factory { + override fun create(containerName: String): LockscreenSceneInteractor { return utils.lockScreenSceneInteractor( authenticationInteractor = authenticationInteractor, sceneInteractor = sceneInteractor, diff --git a/packages/SystemUI/tests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt index 6c7017bac68e..de15c7711bb3 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt @@ -45,7 +45,7 @@ class SceneContainerRepositoryTest : SysuiTestCase() { listOf( SceneKey.QuickSettings, SceneKey.Shade, - SceneKey.LockScreen, + SceneKey.Lockscreen, SceneKey.Bouncer, SceneKey.Gone, ) @@ -62,7 +62,7 @@ class SceneContainerRepositoryTest : SysuiTestCase() { fun currentScene() = runTest { val underTest = utils.fakeSceneContainerRepository() val currentScene by collectLastValue(underTest.currentScene("container1")) - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.LockScreen)) + assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen)) underTest.setCurrentScene("container1", SceneModel(SceneKey.Shade)) assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Shade)) @@ -88,7 +88,7 @@ class SceneContainerRepositoryTest : SysuiTestCase() { utils.fakeSceneContainerConfig("container1"), utils.fakeSceneContainerConfig( "container2", - listOf(SceneKey.QuickSettings, SceneKey.LockScreen) + listOf(SceneKey.QuickSettings, SceneKey.Lockscreen) ), ) ) diff --git a/packages/SystemUI/tests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt index cf99e3b09b32..ee4f6c23ca8a 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt @@ -46,7 +46,7 @@ class SceneInteractorTest : SysuiTestCase() { @Test fun sceneTransitions() = runTest { val currentScene by collectLastValue(underTest.currentScene("container1")) - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.LockScreen)) + assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen)) underTest.setCurrentScene("container1", SceneModel(SceneKey.Shade)) assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Shade)) diff --git a/packages/SystemUI/tests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt index 6105c8735714..cd2f5af592cf 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt @@ -63,7 +63,7 @@ class SceneContainerViewModelTest : SysuiTestCase() { @Test fun sceneTransition() = runTest { val currentScene by collectLastValue(underTest.currentScene) - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.LockScreen)) + assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen)) underTest.setCurrentScene(SceneModel(SceneKey.Shade)) assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Shade)) diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt index 2e7f83d597f2..69d03d9b0e4c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt @@ -20,7 +20,7 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.authentication.shared.model.AuthenticationMethodModel import com.android.systemui.coroutines.collectLastValue -import com.android.systemui.keyguard.domain.interactor.LockScreenSceneInteractor +import com.android.systemui.keyguard.domain.interactor.LockscreenSceneInteractor import com.android.systemui.scene.SceneTestUtils import com.android.systemui.scene.SceneTestUtils.Companion.CONTAINER_1 import com.android.systemui.scene.shared.model.SceneKey @@ -50,9 +50,9 @@ class ShadeSceneViewModelTest : SysuiTestCase() { private val underTest = ShadeSceneViewModel( applicationScope = testScope.backgroundScope, - lockScreenSceneInteractorFactory = - object : LockScreenSceneInteractor.Factory { - override fun create(containerName: String): LockScreenSceneInteractor { + lockscreenSceneInteractorFactory = + object : LockscreenSceneInteractor.Factory { + override fun create(containerName: String): LockscreenSceneInteractor { return utils.lockScreenSceneInteractor( authenticationInteractor = authenticationInteractor, sceneInteractor = sceneInteractor, @@ -74,7 +74,7 @@ class ShadeSceneViewModelTest : SysuiTestCase() { authenticationInteractor.setAuthenticationMethod(AuthenticationMethodModel.PIN(1234)) authenticationInteractor.lockDevice() - assertThat(upTransitionSceneKey).isEqualTo(SceneKey.LockScreen) + assertThat(upTransitionSceneKey).isEqualTo(SceneKey.Lockscreen) } @Test diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneTestUtils.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneTestUtils.kt index 5a350bb540b7..be3d54acd739 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneTestUtils.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneTestUtils.kt @@ -23,7 +23,7 @@ import com.android.systemui.authentication.domain.interactor.AuthenticationInter import com.android.systemui.bouncer.data.repo.BouncerRepository import com.android.systemui.bouncer.domain.interactor.BouncerInteractor import com.android.systemui.bouncer.ui.viewmodel.BouncerViewModel -import com.android.systemui.keyguard.domain.interactor.LockScreenSceneInteractor +import com.android.systemui.keyguard.domain.interactor.LockscreenSceneInteractor import com.android.systemui.scene.data.model.SceneContainerConfig import com.android.systemui.scene.data.repository.SceneContainerRepository import com.android.systemui.scene.domain.interactor.SceneInteractor @@ -58,7 +58,7 @@ class SceneTestUtils( return listOf( SceneKey.QuickSettings, SceneKey.Shade, - SceneKey.LockScreen, + SceneKey.Lockscreen, SceneKey.Bouncer, SceneKey.Gone, ) @@ -71,7 +71,7 @@ class SceneTestUtils( return SceneContainerConfig( name = name, sceneKeys = sceneKeys, - initialSceneKey = SceneKey.LockScreen, + initialSceneKey = SceneKey.Lockscreen, ) } @@ -139,8 +139,8 @@ class SceneTestUtils( authenticationInteractor: AuthenticationInteractor, sceneInteractor: SceneInteractor, bouncerInteractor: BouncerInteractor, - ): LockScreenSceneInteractor { - return LockScreenSceneInteractor( + ): LockscreenSceneInteractor { + return LockscreenSceneInteractor( applicationScope = applicationScope(), authenticationInteractor = authenticationInteractor, bouncerInteractorFactory = |