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

Commit 6580a0d2 authored by Behnam Heydarshahi's avatar Behnam Heydarshahi Committed by Android (Google) Code Review
Browse files

Merge "Internet tile data interactor to include icon id" into main

parents db292b6d 39d9541a
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ class InternetTileDataInteractorTest : SysuiTestCase() {

            val actualIcon = latest?.icon
            assertThat(actualIcon).isEqualTo(expectedIcon)
            assertThat(latest?.iconId).isNull()
            assertThat(latest?.iconId).isEqualTo(WifiIcons.WIFI_NO_INTERNET_ICONS[4])
            assertThat(latest?.contentDescription.loadContentDescription(context))
                .isEqualTo("$internet,test ssid")
            val expectedSd = wifiIcon.contentDescription
@@ -443,15 +443,15 @@ class InternetTileDataInteractorTest : SysuiTestCase() {
     * on the mentioned context. Since that context does not have a looper assigned to it, the
     * handler instantiation will throw a RuntimeException.
     *
     * TODO(b/338068066): Robolectric behavior differs in that it does not throw the exception
     * So either we should make Robolectric behvase similar to the device test, or change this
     * test to look for a different signal than the exception, when run by Robolectric. For now
     * we just assume the test is not Robolectric.
     * TODO(b/338068066): Robolectric behavior differs in that it does not throw the exception So
     *   either we should make Robolectric behave similar to the device test, or change this test to
     *   look for a different signal than the exception, when run by Robolectric. For now we just
     *   assume the test is not Robolectric.
     */
    @Test(expected = java.lang.RuntimeException::class)
    fun mobileDefault_usesNetworkNameAndIcon_throwsRunTimeException() =
        testScope.runTest {
            assumeFalse(isRobolectricTest());
            assumeFalse(isRobolectricTest())

            collectLastValue(underTest.tileData(testUser, flowOf(DataUpdateTrigger.InitialRequest)))

+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ constructor(
                flowOf(
                    InternetTileModel.Active(
                        secondaryTitle = secondary,
                        iconId = wifiIcon.icon.res,
                        icon = Icon.Loaded(context.getDrawable(wifiIcon.icon.res)!!, null),
                        stateDescription = wifiIcon.contentDescription,
                        contentDescription = ContentDescription.Loaded("$internetLabel,$secondary"),