Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractor.kt +1 −1 Original line number Diff line number Diff line Loading @@ -259,7 +259,7 @@ constructor( */ override val isDefaultConnectionFailed: StateFlow<Boolean> = combine( mobileConnectionsRepo.mobileIsDefault, mobileIsDefault, mobileConnectionsRepo.defaultConnectionIsValidated, forcingCellularValidation, ) { mobileIsDefault, defaultConnectionIsValidated, forcingCellularValidation -> Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractorTest.kt +15 −0 Original line number Diff line number Diff line Loading @@ -361,6 +361,21 @@ class MobileIconsInteractorTest : SysuiTestCase() { job.cancel() } @Test fun failedConnection_carrierMergedDefault_notValidated_failed() = testScope.runTest { var latest: Boolean? = null val job = underTest.isDefaultConnectionFailed.onEach { latest = it }.launchIn(this) connectionsRepository.hasCarrierMergedConnection.value = true connectionsRepository.defaultConnectionIsValidated.value = false yield() assertThat(latest).isTrue() job.cancel() } /** Regression test for b/275076959. */ @Test fun failedConnection_dataSwitchInSameGroup_notFailed() = Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractor.kt +1 −1 Original line number Diff line number Diff line Loading @@ -259,7 +259,7 @@ constructor( */ override val isDefaultConnectionFailed: StateFlow<Boolean> = combine( mobileConnectionsRepo.mobileIsDefault, mobileIsDefault, mobileConnectionsRepo.defaultConnectionIsValidated, forcingCellularValidation, ) { mobileIsDefault, defaultConnectionIsValidated, forcingCellularValidation -> Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractorTest.kt +15 −0 Original line number Diff line number Diff line Loading @@ -361,6 +361,21 @@ class MobileIconsInteractorTest : SysuiTestCase() { job.cancel() } @Test fun failedConnection_carrierMergedDefault_notValidated_failed() = testScope.runTest { var latest: Boolean? = null val job = underTest.isDefaultConnectionFailed.onEach { latest = it }.launchIn(this) connectionsRepository.hasCarrierMergedConnection.value = true connectionsRepository.defaultConnectionIsValidated.value = false yield() assertThat(latest).isTrue() job.cancel() } /** Regression test for b/275076959. */ @Test fun failedConnection_dataSwitchInSameGroup_notFailed() = Loading