Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f26a2cb authored by Caitlin Shkuratov's avatar Caitlin Shkuratov Committed by Automerger Merge Worker
Browse files

Merge "[SB Refactor] Use the calculated mobileIsDefault for failed...

Merge "[SB Refactor] Use the calculated mobileIsDefault for failed connection." into udc-dev am: e7f2e5bc am: b3c273bc

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23037700



Change-Id: I93a003b74b726967facff6529e97406c166c3bf5
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a3fee757 b3c273bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -259,7 +259,7 @@ constructor(
     */
    override val isDefaultConnectionFailed: StateFlow<Boolean> =
        combine(
                mobileConnectionsRepo.mobileIsDefault,
                mobileIsDefault,
                mobileConnectionsRepo.defaultConnectionIsValidated,
                forcingCellularValidation,
            ) { mobileIsDefault, defaultConnectionIsValidated, forcingCellularValidation ->
+15 −0
Original line number Diff line number Diff line
@@ -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() =