Merge "[SB Refactor] Use the calculated mobileIsDefault for failed connection." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e7f2e5bc56
@@ -259,7 +259,7 @@ constructor(
|
|||||||
*/
|
*/
|
||||||
override val isDefaultConnectionFailed: StateFlow<Boolean> =
|
override val isDefaultConnectionFailed: StateFlow<Boolean> =
|
||||||
combine(
|
combine(
|
||||||
mobileConnectionsRepo.mobileIsDefault,
|
mobileIsDefault,
|
||||||
mobileConnectionsRepo.defaultConnectionIsValidated,
|
mobileConnectionsRepo.defaultConnectionIsValidated,
|
||||||
forcingCellularValidation,
|
forcingCellularValidation,
|
||||||
) { mobileIsDefault, defaultConnectionIsValidated, forcingCellularValidation ->
|
) { mobileIsDefault, defaultConnectionIsValidated, forcingCellularValidation ->
|
||||||
|
|||||||
@@ -361,6 +361,21 @@ class MobileIconsInteractorTest : SysuiTestCase() {
|
|||||||
job.cancel()
|
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. */
|
/** Regression test for b/275076959. */
|
||||||
@Test
|
@Test
|
||||||
fun failedConnection_dataSwitchInSameGroup_notFailed() =
|
fun failedConnection_dataSwitchInSameGroup_notFailed() =
|
||||||
|
|||||||
Reference in New Issue
Block a user