Loading packages/SystemUI/multivalentTests/src/com/android/systemui/common/ui/domain/interactor/ConfigurationInteractorTest.kt +3 −3 Original line number Original line Diff line number Diff line Loading @@ -55,7 +55,7 @@ class ConfigurationInteractorTest : SysuiTestCase() { testableResources.overrideConfiguration(configuration) testableResources.overrideConfiguration(configuration) configurationRepository = FakeConfigurationRepository() configurationRepository = FakeConfigurationRepository() testScope = TestScope() testScope = TestScope() underTest = ConfigurationInteractor(configurationRepository) underTest = ConfigurationInteractorImpl(configurationRepository) } } @Test @Test Loading Loading @@ -207,7 +207,7 @@ class ConfigurationInteractorTest : SysuiTestCase() { updateDisplay( updateDisplay( width = DISPLAY_HEIGHT, width = DISPLAY_HEIGHT, height = DISPLAY_WIDTH, height = DISPLAY_WIDTH, rotation = Surface.ROTATION_90 rotation = Surface.ROTATION_90, ) ) runCurrent() runCurrent() Loading @@ -217,7 +217,7 @@ class ConfigurationInteractorTest : SysuiTestCase() { private fun updateDisplay( private fun updateDisplay( width: Int = DISPLAY_WIDTH, width: Int = DISPLAY_WIDTH, height: Int = DISPLAY_HEIGHT, height: Int = DISPLAY_HEIGHT, @Surface.Rotation rotation: Int = Surface.ROTATION_0 @Surface.Rotation rotation: Int = Surface.ROTATION_0, ) { ) { configuration.windowConfiguration.maxBounds.set(Rect(0, 0, width, height)) configuration.windowConfiguration.maxBounds.set(Rect(0, 0, width, height)) configuration.windowConfiguration.displayRotation = rotation configuration.windowConfiguration.displayRotation = rotation Loading packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/docking/ui/viewmodel/KeyboardDockingIndicationViewModelTest.kt +3 −3 Original line number Original line Diff line number Diff line Loading @@ -24,7 +24,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.SysuiTestCase import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractor import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractorImpl import com.android.systemui.keyboard.data.repository.FakeKeyboardRepository import com.android.systemui.keyboard.data.repository.FakeKeyboardRepository import com.android.systemui.keyboard.docking.domain.interactor.KeyboardDockingIndicationInteractor import com.android.systemui.keyboard.docking.domain.interactor.KeyboardDockingIndicationInteractor import com.google.common.truth.Truth.assertThat import com.google.common.truth.Truth.assertThat Loading Loading @@ -59,7 +59,7 @@ class KeyboardDockingIndicationViewModelTest : SysuiTestCase() { val keyboardDockingIndicationInteractor = val keyboardDockingIndicationInteractor = KeyboardDockingIndicationInteractor(keyboardRepository) KeyboardDockingIndicationInteractor(keyboardRepository) val configurationInteractor = ConfigurationInteractor(configurationRepository) val configurationInteractor = ConfigurationInteractorImpl(configurationRepository) underTest = underTest = KeyboardDockingIndicationViewModel( KeyboardDockingIndicationViewModel( Loading @@ -67,7 +67,7 @@ class KeyboardDockingIndicationViewModelTest : SysuiTestCase() { context, context, keyboardDockingIndicationInteractor, keyboardDockingIndicationInteractor, configurationInteractor, configurationInteractor, testScope.backgroundScope testScope.backgroundScope, ) ) } } Loading packages/SystemUI/multivalentTests/src/com/android/systemui/qs/ui/adapter/QSSceneAdapterImplTest.kt +4 −10 Original line number Original line Diff line number Diff line Loading @@ -26,7 +26,7 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.SysuiTestCase import com.android.systemui.biometrics.domain.interactor.displayStateInteractor import com.android.systemui.biometrics.domain.interactor.displayStateInteractor import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractor import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractorImpl import com.android.systemui.coroutines.collectLastValue import com.android.systemui.coroutines.collectLastValue import com.android.systemui.display.data.repository.displayStateRepository import com.android.systemui.display.data.repository.displayStateRepository import com.android.systemui.dump.DumpManager import com.android.systemui.dump.DumpManager Loading Loading @@ -101,7 +101,7 @@ class QSSceneAdapterImplTest : SysuiTestCase() { private val fakeConfigurationRepository = private val fakeConfigurationRepository = FakeConfigurationRepository().apply { onConfigurationChange(configuration) } FakeConfigurationRepository().apply { onConfigurationChange(configuration) } private val configurationInteractor = ConfigurationInteractor(fakeConfigurationRepository) private val configurationInteractor = ConfigurationInteractorImpl(fakeConfigurationRepository) private val mockAsyncLayoutInflater = private val mockAsyncLayoutInflater = mock<AsyncLayoutInflater>() { mock<AsyncLayoutInflater>() { Loading Loading @@ -151,10 +151,7 @@ class QSSceneAdapterImplTest : SysuiTestCase() { inOrder.verify(qsImpl!!).onCreate(nullable()) inOrder.verify(qsImpl!!).onCreate(nullable()) inOrder inOrder .verify(qsImpl!!) .verify(qsImpl!!) .onComponentCreated( .onComponentCreated(eq(qsSceneComponentFactory.components[0]), any()) eq(qsSceneComponentFactory.components[0]), any(), ) } } @Test @Test Loading Loading @@ -422,10 +419,7 @@ class QSSceneAdapterImplTest : SysuiTestCase() { inOrder.verify(newQSImpl).onCreate(nullable()) inOrder.verify(newQSImpl).onCreate(nullable()) inOrder inOrder .verify(newQSImpl) .verify(newQSImpl) .onComponentCreated( .onComponentCreated(qsSceneComponentFactory.components[1], bundleArgCaptor.value) qsSceneComponentFactory.components[1], bundleArgCaptor.value, ) } } @Test @Test Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/HideNotificationsInteractorTest.kt +6 −6 Original line number Original line Diff line number Diff line Loading @@ -24,7 +24,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.SysuiTestCase import com.android.systemui.common.ui.data.repository.ConfigurationRepositoryImpl import com.android.systemui.common.ui.data.repository.ConfigurationRepositoryImpl import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractor import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractorImpl import com.android.systemui.coroutines.collectValues import com.android.systemui.coroutines.collectValues import com.android.systemui.power.data.repository.FakePowerRepository import com.android.systemui.power.data.repository.FakePowerRepository import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.power.domain.interactor.PowerInteractor Loading Loading @@ -75,9 +75,9 @@ open class HideNotificationsInteractorTest : SysuiTestCase() { configurationController, configurationController, context, context, testScope.backgroundScope, testScope.backgroundScope, mock() mock(), ) ) private val configurationInteractor = ConfigurationInteractor(configurationRepository) private val configurationInteractor = ConfigurationInteractorImpl(configurationRepository) private val unfoldTransitionRepository = private val unfoldTransitionRepository = UnfoldTransitionRepositoryImpl(Optional.of(unfoldTransitionProgressProvider)) UnfoldTransitionRepositoryImpl(Optional.of(unfoldTransitionProgressProvider)) Loading @@ -103,7 +103,7 @@ open class HideNotificationsInteractorTest : SysuiTestCase() { unfoldTransitionInteractor, unfoldTransitionInteractor, configurationInteractor, configurationInteractor, animationStatus, animationStatus, powerInteractor powerInteractor, ) ) } } Loading Loading @@ -140,7 +140,7 @@ open class HideNotificationsInteractorTest : SysuiTestCase() { updateDisplay( updateDisplay( width = INITIAL_DISPLAY_HEIGHT, width = INITIAL_DISPLAY_HEIGHT, height = INITIAL_DISPLAY_WIDTH, height = INITIAL_DISPLAY_WIDTH, rotation = ROTATION_90 rotation = ROTATION_90, ) ) runCurrent() runCurrent() Loading Loading @@ -284,7 +284,7 @@ open class HideNotificationsInteractorTest : SysuiTestCase() { private fun updateDisplay( private fun updateDisplay( width: Int = INITIAL_DISPLAY_WIDTH, width: Int = INITIAL_DISPLAY_WIDTH, height: Int = INITIAL_DISPLAY_HEIGHT, height: Int = INITIAL_DISPLAY_HEIGHT, @Surface.Rotation rotation: Int = ROTATION_0 @Surface.Rotation rotation: Int = ROTATION_0, ) { ) { configuration.windowConfiguration.maxBounds.set(Rect(0, 0, width, height)) configuration.windowConfiguration.maxBounds.set(Rect(0, 0, width, height)) configuration.windowConfiguration.displayRotation = rotation configuration.windowConfiguration.displayRotation = rotation Loading packages/SystemUI/multivalentTests/src/com/android/systemui/unfold/DisplaySwitchLatencyTrackerTest.kt +13 −13 Original line number Original line Diff line number Diff line Loading @@ -24,7 +24,7 @@ import androidx.test.filters.SmallTest import com.android.internal.R import com.android.internal.R import com.android.systemui.SysuiTestCase import com.android.systemui.SysuiTestCase import com.android.systemui.common.ui.data.repository.ConfigurationRepositoryImpl import com.android.systemui.common.ui.data.repository.ConfigurationRepositoryImpl import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractor import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractorImpl import com.android.systemui.defaultDeviceState import com.android.systemui.defaultDeviceState import com.android.systemui.deviceStateManager import com.android.systemui.deviceStateManager import com.android.systemui.display.data.repository.DeviceStateRepository import com.android.systemui.display.data.repository.DeviceStateRepository Loading Loading @@ -107,9 +107,9 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { configurationController, configurationController, context, context, testScope.backgroundScope, testScope.backgroundScope, mock() mock(), ) ) private val configurationInteractor = ConfigurationInteractor(configurationRepository) private val configurationInteractor = ConfigurationInteractorImpl(configurationRepository) private val unfoldTransitionProgressProvider = FakeUnfoldTransitionProvider() private val unfoldTransitionProgressProvider = FakeUnfoldTransitionProvider() private val unfoldTransitionRepository = private val unfoldTransitionRepository = UnfoldTransitionRepositoryImpl(Optional.of(unfoldTransitionProgressProvider)) UnfoldTransitionRepositoryImpl(Optional.of(unfoldTransitionProgressProvider)) Loading Loading @@ -145,7 +145,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { testScope.backgroundScope, testScope.backgroundScope, displaySwitchLatencyLogger, displaySwitchLatencyLogger, systemClock, systemClock, deviceStateManager deviceStateManager, ) ) } } Loading Loading @@ -174,7 +174,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { DisplaySwitchLatencyEvent( DisplaySwitchLatencyEvent( latencyMs = 250, latencyMs = 250, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN toFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, ) ) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) } } Loading @@ -200,7 +200,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { testScope.backgroundScope, testScope.backgroundScope, displaySwitchLatencyLogger, displaySwitchLatencyLogger, systemClock, systemClock, deviceStateManager deviceStateManager, ) ) areAnimationEnabled.emit(true) areAnimationEnabled.emit(true) Loading @@ -226,7 +226,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { DisplaySwitchLatencyEvent( DisplaySwitchLatencyEvent( latencyMs = 50, latencyMs = 50, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN toFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, ) ) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) } } Loading Loading @@ -259,7 +259,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { DisplaySwitchLatencyEvent( DisplaySwitchLatencyEvent( latencyMs = 50, latencyMs = 50, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN toFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, ) ) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) } } Loading Loading @@ -289,7 +289,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { DisplaySwitchLatencyEvent( DisplaySwitchLatencyEvent( latencyMs = 200, latencyMs = 200, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED toFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, ) ) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) } } Loading @@ -310,7 +310,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { lastWakefulnessEvent.emit( lastWakefulnessEvent.emit( WakefulnessModel( WakefulnessModel( internalWakefulnessState = WakefulnessState.ASLEEP, internalWakefulnessState = WakefulnessState.ASLEEP, lastSleepReason = WakeSleepReason.FOLD lastSleepReason = WakeSleepReason.FOLD, ) ) ) ) screenPowerState.emit(ScreenPowerState.SCREEN_OFF) screenPowerState.emit(ScreenPowerState.SCREEN_OFF) Loading @@ -326,7 +326,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { latencyMs = 200, latencyMs = 200, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toState = SysUiStatsLog.DISPLAY_SWITCH_LATENCY_TRACKED__TO_STATE__AOD toState = SysUiStatsLog.DISPLAY_SWITCH_LATENCY_TRACKED__TO_STATE__AOD, ) ) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) } } Loading Loading @@ -372,7 +372,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { lastWakefulnessEvent.emit( lastWakefulnessEvent.emit( WakefulnessModel( WakefulnessModel( internalWakefulnessState = WakefulnessState.ASLEEP, internalWakefulnessState = WakefulnessState.ASLEEP, lastSleepReason = WakeSleepReason.FOLD lastSleepReason = WakeSleepReason.FOLD, ) ) ) ) screenPowerState.emit(ScreenPowerState.SCREEN_OFF) screenPowerState.emit(ScreenPowerState.SCREEN_OFF) Loading @@ -385,7 +385,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { latencyMs = 0, latencyMs = 0, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toState = SysUiStatsLog.DISPLAY_SWITCH_LATENCY_TRACKED__TO_STATE__SCREEN_OFF toState = SysUiStatsLog.DISPLAY_SWITCH_LATENCY_TRACKED__TO_STATE__SCREEN_OFF, ) ) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) } } Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/common/ui/domain/interactor/ConfigurationInteractorTest.kt +3 −3 Original line number Original line Diff line number Diff line Loading @@ -55,7 +55,7 @@ class ConfigurationInteractorTest : SysuiTestCase() { testableResources.overrideConfiguration(configuration) testableResources.overrideConfiguration(configuration) configurationRepository = FakeConfigurationRepository() configurationRepository = FakeConfigurationRepository() testScope = TestScope() testScope = TestScope() underTest = ConfigurationInteractor(configurationRepository) underTest = ConfigurationInteractorImpl(configurationRepository) } } @Test @Test Loading Loading @@ -207,7 +207,7 @@ class ConfigurationInteractorTest : SysuiTestCase() { updateDisplay( updateDisplay( width = DISPLAY_HEIGHT, width = DISPLAY_HEIGHT, height = DISPLAY_WIDTH, height = DISPLAY_WIDTH, rotation = Surface.ROTATION_90 rotation = Surface.ROTATION_90, ) ) runCurrent() runCurrent() Loading @@ -217,7 +217,7 @@ class ConfigurationInteractorTest : SysuiTestCase() { private fun updateDisplay( private fun updateDisplay( width: Int = DISPLAY_WIDTH, width: Int = DISPLAY_WIDTH, height: Int = DISPLAY_HEIGHT, height: Int = DISPLAY_HEIGHT, @Surface.Rotation rotation: Int = Surface.ROTATION_0 @Surface.Rotation rotation: Int = Surface.ROTATION_0, ) { ) { configuration.windowConfiguration.maxBounds.set(Rect(0, 0, width, height)) configuration.windowConfiguration.maxBounds.set(Rect(0, 0, width, height)) configuration.windowConfiguration.displayRotation = rotation configuration.windowConfiguration.displayRotation = rotation Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/docking/ui/viewmodel/KeyboardDockingIndicationViewModelTest.kt +3 −3 Original line number Original line Diff line number Diff line Loading @@ -24,7 +24,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.SysuiTestCase import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractor import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractorImpl import com.android.systemui.keyboard.data.repository.FakeKeyboardRepository import com.android.systemui.keyboard.data.repository.FakeKeyboardRepository import com.android.systemui.keyboard.docking.domain.interactor.KeyboardDockingIndicationInteractor import com.android.systemui.keyboard.docking.domain.interactor.KeyboardDockingIndicationInteractor import com.google.common.truth.Truth.assertThat import com.google.common.truth.Truth.assertThat Loading Loading @@ -59,7 +59,7 @@ class KeyboardDockingIndicationViewModelTest : SysuiTestCase() { val keyboardDockingIndicationInteractor = val keyboardDockingIndicationInteractor = KeyboardDockingIndicationInteractor(keyboardRepository) KeyboardDockingIndicationInteractor(keyboardRepository) val configurationInteractor = ConfigurationInteractor(configurationRepository) val configurationInteractor = ConfigurationInteractorImpl(configurationRepository) underTest = underTest = KeyboardDockingIndicationViewModel( KeyboardDockingIndicationViewModel( Loading @@ -67,7 +67,7 @@ class KeyboardDockingIndicationViewModelTest : SysuiTestCase() { context, context, keyboardDockingIndicationInteractor, keyboardDockingIndicationInteractor, configurationInteractor, configurationInteractor, testScope.backgroundScope testScope.backgroundScope, ) ) } } Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/qs/ui/adapter/QSSceneAdapterImplTest.kt +4 −10 Original line number Original line Diff line number Diff line Loading @@ -26,7 +26,7 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.SysuiTestCase import com.android.systemui.biometrics.domain.interactor.displayStateInteractor import com.android.systemui.biometrics.domain.interactor.displayStateInteractor import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractor import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractorImpl import com.android.systemui.coroutines.collectLastValue import com.android.systemui.coroutines.collectLastValue import com.android.systemui.display.data.repository.displayStateRepository import com.android.systemui.display.data.repository.displayStateRepository import com.android.systemui.dump.DumpManager import com.android.systemui.dump.DumpManager Loading Loading @@ -101,7 +101,7 @@ class QSSceneAdapterImplTest : SysuiTestCase() { private val fakeConfigurationRepository = private val fakeConfigurationRepository = FakeConfigurationRepository().apply { onConfigurationChange(configuration) } FakeConfigurationRepository().apply { onConfigurationChange(configuration) } private val configurationInteractor = ConfigurationInteractor(fakeConfigurationRepository) private val configurationInteractor = ConfigurationInteractorImpl(fakeConfigurationRepository) private val mockAsyncLayoutInflater = private val mockAsyncLayoutInflater = mock<AsyncLayoutInflater>() { mock<AsyncLayoutInflater>() { Loading Loading @@ -151,10 +151,7 @@ class QSSceneAdapterImplTest : SysuiTestCase() { inOrder.verify(qsImpl!!).onCreate(nullable()) inOrder.verify(qsImpl!!).onCreate(nullable()) inOrder inOrder .verify(qsImpl!!) .verify(qsImpl!!) .onComponentCreated( .onComponentCreated(eq(qsSceneComponentFactory.components[0]), any()) eq(qsSceneComponentFactory.components[0]), any(), ) } } @Test @Test Loading Loading @@ -422,10 +419,7 @@ class QSSceneAdapterImplTest : SysuiTestCase() { inOrder.verify(newQSImpl).onCreate(nullable()) inOrder.verify(newQSImpl).onCreate(nullable()) inOrder inOrder .verify(newQSImpl) .verify(newQSImpl) .onComponentCreated( .onComponentCreated(qsSceneComponentFactory.components[1], bundleArgCaptor.value) qsSceneComponentFactory.components[1], bundleArgCaptor.value, ) } } @Test @Test Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/HideNotificationsInteractorTest.kt +6 −6 Original line number Original line Diff line number Diff line Loading @@ -24,7 +24,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.SysuiTestCase import com.android.systemui.common.ui.data.repository.ConfigurationRepositoryImpl import com.android.systemui.common.ui.data.repository.ConfigurationRepositoryImpl import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractor import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractorImpl import com.android.systemui.coroutines.collectValues import com.android.systemui.coroutines.collectValues import com.android.systemui.power.data.repository.FakePowerRepository import com.android.systemui.power.data.repository.FakePowerRepository import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.power.domain.interactor.PowerInteractor Loading Loading @@ -75,9 +75,9 @@ open class HideNotificationsInteractorTest : SysuiTestCase() { configurationController, configurationController, context, context, testScope.backgroundScope, testScope.backgroundScope, mock() mock(), ) ) private val configurationInteractor = ConfigurationInteractor(configurationRepository) private val configurationInteractor = ConfigurationInteractorImpl(configurationRepository) private val unfoldTransitionRepository = private val unfoldTransitionRepository = UnfoldTransitionRepositoryImpl(Optional.of(unfoldTransitionProgressProvider)) UnfoldTransitionRepositoryImpl(Optional.of(unfoldTransitionProgressProvider)) Loading @@ -103,7 +103,7 @@ open class HideNotificationsInteractorTest : SysuiTestCase() { unfoldTransitionInteractor, unfoldTransitionInteractor, configurationInteractor, configurationInteractor, animationStatus, animationStatus, powerInteractor powerInteractor, ) ) } } Loading Loading @@ -140,7 +140,7 @@ open class HideNotificationsInteractorTest : SysuiTestCase() { updateDisplay( updateDisplay( width = INITIAL_DISPLAY_HEIGHT, width = INITIAL_DISPLAY_HEIGHT, height = INITIAL_DISPLAY_WIDTH, height = INITIAL_DISPLAY_WIDTH, rotation = ROTATION_90 rotation = ROTATION_90, ) ) runCurrent() runCurrent() Loading Loading @@ -284,7 +284,7 @@ open class HideNotificationsInteractorTest : SysuiTestCase() { private fun updateDisplay( private fun updateDisplay( width: Int = INITIAL_DISPLAY_WIDTH, width: Int = INITIAL_DISPLAY_WIDTH, height: Int = INITIAL_DISPLAY_HEIGHT, height: Int = INITIAL_DISPLAY_HEIGHT, @Surface.Rotation rotation: Int = ROTATION_0 @Surface.Rotation rotation: Int = ROTATION_0, ) { ) { configuration.windowConfiguration.maxBounds.set(Rect(0, 0, width, height)) configuration.windowConfiguration.maxBounds.set(Rect(0, 0, width, height)) configuration.windowConfiguration.displayRotation = rotation configuration.windowConfiguration.displayRotation = rotation Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/unfold/DisplaySwitchLatencyTrackerTest.kt +13 −13 Original line number Original line Diff line number Diff line Loading @@ -24,7 +24,7 @@ import androidx.test.filters.SmallTest import com.android.internal.R import com.android.internal.R import com.android.systemui.SysuiTestCase import com.android.systemui.SysuiTestCase import com.android.systemui.common.ui.data.repository.ConfigurationRepositoryImpl import com.android.systemui.common.ui.data.repository.ConfigurationRepositoryImpl import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractor import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractorImpl import com.android.systemui.defaultDeviceState import com.android.systemui.defaultDeviceState import com.android.systemui.deviceStateManager import com.android.systemui.deviceStateManager import com.android.systemui.display.data.repository.DeviceStateRepository import com.android.systemui.display.data.repository.DeviceStateRepository Loading Loading @@ -107,9 +107,9 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { configurationController, configurationController, context, context, testScope.backgroundScope, testScope.backgroundScope, mock() mock(), ) ) private val configurationInteractor = ConfigurationInteractor(configurationRepository) private val configurationInteractor = ConfigurationInteractorImpl(configurationRepository) private val unfoldTransitionProgressProvider = FakeUnfoldTransitionProvider() private val unfoldTransitionProgressProvider = FakeUnfoldTransitionProvider() private val unfoldTransitionRepository = private val unfoldTransitionRepository = UnfoldTransitionRepositoryImpl(Optional.of(unfoldTransitionProgressProvider)) UnfoldTransitionRepositoryImpl(Optional.of(unfoldTransitionProgressProvider)) Loading Loading @@ -145,7 +145,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { testScope.backgroundScope, testScope.backgroundScope, displaySwitchLatencyLogger, displaySwitchLatencyLogger, systemClock, systemClock, deviceStateManager deviceStateManager, ) ) } } Loading Loading @@ -174,7 +174,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { DisplaySwitchLatencyEvent( DisplaySwitchLatencyEvent( latencyMs = 250, latencyMs = 250, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN toFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, ) ) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) } } Loading @@ -200,7 +200,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { testScope.backgroundScope, testScope.backgroundScope, displaySwitchLatencyLogger, displaySwitchLatencyLogger, systemClock, systemClock, deviceStateManager deviceStateManager, ) ) areAnimationEnabled.emit(true) areAnimationEnabled.emit(true) Loading @@ -226,7 +226,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { DisplaySwitchLatencyEvent( DisplaySwitchLatencyEvent( latencyMs = 50, latencyMs = 50, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN toFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, ) ) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) } } Loading Loading @@ -259,7 +259,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { DisplaySwitchLatencyEvent( DisplaySwitchLatencyEvent( latencyMs = 50, latencyMs = 50, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN toFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, ) ) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) } } Loading Loading @@ -289,7 +289,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { DisplaySwitchLatencyEvent( DisplaySwitchLatencyEvent( latencyMs = 200, latencyMs = 200, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED toFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, ) ) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) } } Loading @@ -310,7 +310,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { lastWakefulnessEvent.emit( lastWakefulnessEvent.emit( WakefulnessModel( WakefulnessModel( internalWakefulnessState = WakefulnessState.ASLEEP, internalWakefulnessState = WakefulnessState.ASLEEP, lastSleepReason = WakeSleepReason.FOLD lastSleepReason = WakeSleepReason.FOLD, ) ) ) ) screenPowerState.emit(ScreenPowerState.SCREEN_OFF) screenPowerState.emit(ScreenPowerState.SCREEN_OFF) Loading @@ -326,7 +326,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { latencyMs = 200, latencyMs = 200, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toState = SysUiStatsLog.DISPLAY_SWITCH_LATENCY_TRACKED__TO_STATE__AOD toState = SysUiStatsLog.DISPLAY_SWITCH_LATENCY_TRACKED__TO_STATE__AOD, ) ) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) } } Loading Loading @@ -372,7 +372,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { lastWakefulnessEvent.emit( lastWakefulnessEvent.emit( WakefulnessModel( WakefulnessModel( internalWakefulnessState = WakefulnessState.ASLEEP, internalWakefulnessState = WakefulnessState.ASLEEP, lastSleepReason = WakeSleepReason.FOLD lastSleepReason = WakeSleepReason.FOLD, ) ) ) ) screenPowerState.emit(ScreenPowerState.SCREEN_OFF) screenPowerState.emit(ScreenPowerState.SCREEN_OFF) Loading @@ -385,7 +385,7 @@ class DisplaySwitchLatencyTrackerTest : SysuiTestCase() { latencyMs = 0, latencyMs = 0, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, fromFoldableDeviceState = FOLDABLE_DEVICE_STATE_HALF_OPEN, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toFoldableDeviceState = FOLDABLE_DEVICE_STATE_CLOSED, toState = SysUiStatsLog.DISPLAY_SWITCH_LATENCY_TRACKED__TO_STATE__SCREEN_OFF toState = SysUiStatsLog.DISPLAY_SWITCH_LATENCY_TRACKED__TO_STATE__SCREEN_OFF, ) ) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) assertThat(loggedEvent).isEqualTo(expectedLoggedEvent) } } Loading