diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/NetworkNameModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/NetworkNameModel.kt index c50d82a66c76e..78231e28803eb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/NetworkNameModel.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/NetworkNameModel.kt @@ -48,15 +48,31 @@ sealed interface NetworkNameModel : Diffable { * This name has been derived from telephony intents. see * [android.telephony.TelephonyManager.ACTION_SERVICE_PROVIDERS_UPDATED] */ - data class Derived(override val name: String) : NetworkNameModel { + data class IntentDerived(override val name: String) : NetworkNameModel { override fun logDiffs(prevVal: NetworkNameModel, row: TableRowLogger) { - if (prevVal !is Derived || prevVal.name != name) { - row.logChange(COL_NETWORK_NAME, "Derived($name)") + if (prevVal !is IntentDerived || prevVal.name != name) { + row.logChange(COL_NETWORK_NAME, "IntentDerived($name)") } } override fun logFull(row: TableRowLogger) { - row.logChange(COL_NETWORK_NAME, "Derived($name)") + row.logChange(COL_NETWORK_NAME, "IntentDerived($name)") + } + } + + /** + * This name has been derived from the sim via + * [android.telephony.TelephonyManager.getSimOperatorName]. + */ + data class SimDerived(override val name: String) : NetworkNameModel { + override fun logDiffs(prevVal: NetworkNameModel, row: TableRowLogger) { + if (prevVal !is SimDerived || prevVal.name != name) { + row.logChange(COL_NETWORK_NAME, "SimDerived($name)") + } + } + + override fun logFull(row: TableRowLogger) { + row.logChange(COL_NETWORK_NAME, "SimDerived($name)") } } @@ -84,5 +100,5 @@ fun Intent.toNetworkNameModel(separator: String): NetworkNameModel? { str.append(spn) } - return if (str.isNotEmpty()) NetworkNameModel.Derived(str.toString()) else null + return if (str.isNotEmpty()) NetworkNameModel.IntentDerived(str.toString()) else null } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepository.kt index a778c99a1cffb..d10d11d11c137 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepository.kt @@ -240,7 +240,7 @@ constructor( // This is always true here, because we split out disabled states at the data-source level connection.dataEnabled.value = true - connection.networkName.value = NetworkNameModel.Derived(state.name) + connection.networkName.value = NetworkNameModel.IntentDerived(state.name) connection.cdmaRoaming.value = state.roaming connection.connectionInfo.value = state.toMobileConnectionModel() @@ -264,7 +264,7 @@ constructor( val connection = getRepoForSubId(subId) // This is always true here, because we split out disabled states at the data-source level connection.dataEnabled.value = true - connection.networkName.value = NetworkNameModel.Derived(CARRIER_MERGED_NAME) + connection.networkName.value = NetworkNameModel.IntentDerived(CARRIER_MERGED_NAME) connection.numberOfLevels.value = event.numberOfLevels connection.cdmaRoaming.value = false connection.connectionInfo.value = event.toMobileConnectionModel() @@ -377,5 +377,5 @@ class DemoMobileConnectionRepository( override val cdmaRoaming = MutableStateFlow(false) - override val networkName = MutableStateFlow(NetworkNameModel.Derived("demo network")) + override val networkName = MutableStateFlow(NetworkNameModel.IntentDerived("demo network")) } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepository.kt index 399e055556265..938c7346f7029 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepository.kt @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.pipeline.mobile.data.repository.prod +import android.telephony.TelephonyManager import android.util.Log import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application @@ -37,7 +38,6 @@ import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.combine -import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.stateIn @@ -54,10 +54,18 @@ import kotlinx.coroutines.flow.stateIn class CarrierMergedConnectionRepository( override val subId: Int, override val tableLogBuffer: TableLogBuffer, - defaultNetworkName: NetworkNameModel, + private val telephonyManager: TelephonyManager, @Application private val scope: CoroutineScope, val wifiRepository: WifiRepository, ) : MobileConnectionRepository { + init { + if (telephonyManager.subscriptionId != subId) { + throw IllegalStateException( + "CarrierMergedRepo: TelephonyManager should be created with subId($subId). " + + "Found ${telephonyManager.subscriptionId} instead." + ) + } + } /** * Outputs the carrier merged network to use, or null if we don't have a valid carrier merged @@ -98,10 +106,17 @@ class CarrierMergedConnectionRepository( override val cdmaRoaming: StateFlow = MutableStateFlow(ROAMING).asStateFlow() - // TODO(b/238425913): Fetch the carrier merged network name. override val networkName: StateFlow = - flowOf(defaultNetworkName) - .stateIn(scope, SharingStarted.WhileSubscribed(), defaultNetworkName) + network + // The SIM operator name should be the same throughout the lifetime of a subId, **but** + // it may not be available when this repo is created because it takes time to load. To + // be safe, we re-fetch it each time the network has changed. + .map { NetworkNameModel.SimDerived(telephonyManager.simOperatorName) } + .stateIn( + scope, + SharingStarted.WhileSubscribed(), + NetworkNameModel.SimDerived(telephonyManager.simOperatorName), + ) override val numberOfLevels: StateFlow = wifiRepository.wifiNetwork @@ -150,18 +165,18 @@ class CarrierMergedConnectionRepository( class Factory @Inject constructor( + private val telephonyManager: TelephonyManager, @Application private val scope: CoroutineScope, private val wifiRepository: WifiRepository, ) { fun build( subId: Int, mobileLogger: TableLogBuffer, - defaultNetworkName: NetworkNameModel, ): MobileConnectionRepository { return CarrierMergedConnectionRepository( subId, mobileLogger, - defaultNetworkName, + telephonyManager.createForSubscriptionId(subId), scope, wifiRepository, ) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepository.kt index f17791b655029..a39ea0abce5ad 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepository.kt @@ -86,7 +86,7 @@ class FullMobileConnectionRepository( } private val carrierMergedRepo: MobileConnectionRepository by lazy { - carrierMergedRepoFactory.build(subId, tableLogBuffer, defaultNetworkName) + carrierMergedRepoFactory.build(subId, tableLogBuffer) } @VisibleForTesting diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt index 40225f53da1fe..dcce0ea585126 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt @@ -92,7 +92,7 @@ class MobileConnectionRepositoryImpl( init { if (telephonyManager.subscriptionId != subId) { throw IllegalStateException( - "TelephonyManager should be created with subId($subId). " + + "MobileRepo: TelephonyManager should be created with subId($subId). " + "Found ${telephonyManager.subscriptionId} instead." ) } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt index 9b7614c2ad081..7b0f95271d631 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt @@ -158,7 +158,7 @@ class MobileIconInteractorImpl( if ( networkName is NetworkNameModel.Default && connection.operatorAlphaShort != null ) { - NetworkNameModel.Derived(connection.operatorAlphaShort) + NetworkNameModel.IntentDerived(connection.operatorAlphaShort) } else { networkName } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionParameterizedTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionParameterizedTest.kt index 6989b514a703c..00ce412f2a650 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionParameterizedTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionParameterizedTest.kt @@ -138,7 +138,8 @@ internal class DemoMobileConnectionParameterizedTest(private val testCase: TestC assertThat(connectionInfo.carrierNetworkChangeActive) .isEqualTo(model.carrierNetworkChange) assertThat(connectionInfo.isRoaming).isEqualTo(model.roaming) - assertThat(conn.networkName.value).isEqualTo(NetworkNameModel.Derived(model.name)) + assertThat(conn.networkName.value) + .isEqualTo(NetworkNameModel.IntentDerived(model.name)) // TODO(b/261029387): check these once we start handling them assertThat(connectionInfo.isEmergencyOnly).isFalse() diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepositoryTest.kt index d19aa43fb1553..f60d92bde202d 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepositoryTest.kt @@ -539,7 +539,8 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() { assertThat(connectionInfo.carrierNetworkChangeActive) .isEqualTo(model.carrierNetworkChange) assertThat(connectionInfo.isRoaming).isEqualTo(model.roaming) - assertThat(conn.networkName.value).isEqualTo(NetworkNameModel.Derived(model.name)) + assertThat(conn.networkName.value) + .isEqualTo(NetworkNameModel.IntentDerived(model.name)) // TODO(b/261029387) check these once we start handling them assertThat(connectionInfo.isEmergencyOnly).isFalse() diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepositoryTest.kt index b60b1b40c5082..abb45619e1ddd 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepositoryTest.kt @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.pipeline.mobile.data.repository.prod +import android.telephony.TelephonyManager import android.testing.AndroidTestingRunner import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase @@ -27,6 +28,7 @@ import com.android.systemui.statusbar.pipeline.mobile.data.model.ResolvedNetwork import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel import com.android.systemui.statusbar.pipeline.wifi.data.model.WifiNetworkModel import com.android.systemui.statusbar.pipeline.wifi.data.repository.FakeWifiRepository +import com.android.systemui.util.mockito.whenever import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.launchIn @@ -49,6 +51,7 @@ class CarrierMergedConnectionRepositoryTest : SysuiTestCase() { private lateinit var wifiRepository: FakeWifiRepository @Mock private lateinit var logger: TableLogBuffer + @Mock private lateinit var telephonyManager: TelephonyManager private val testDispatcher = UnconfinedTestDispatcher() private val testScope = TestScope(testDispatcher) @@ -56,13 +59,16 @@ class CarrierMergedConnectionRepositoryTest : SysuiTestCase() { @Before fun setUp() { MockitoAnnotations.initMocks(this) + whenever(telephonyManager.subscriptionId).thenReturn(SUB_ID) + whenever(telephonyManager.simOperatorName).thenReturn("") + wifiRepository = FakeWifiRepository() underTest = CarrierMergedConnectionRepository( SUB_ID, logger, - NetworkNameModel.Default("name"), + telephonyManager, testScope.backgroundScope, wifiRepository, ) @@ -282,6 +288,43 @@ class CarrierMergedConnectionRepositoryTest : SysuiTestCase() { job.cancel() } + @Test + fun networkName_usesSimOperatorNameAsInitial() = + testScope.runTest { + whenever(telephonyManager.simOperatorName).thenReturn("Test SIM name") + + var latest: NetworkNameModel? = null + val job = underTest.networkName.onEach { latest = it }.launchIn(this) + + assertThat(latest).isEqualTo(NetworkNameModel.SimDerived("Test SIM name")) + + job.cancel() + } + + @Test + fun networkName_updatesOnNetworkUpdate() = + testScope.runTest { + whenever(telephonyManager.simOperatorName).thenReturn("Test SIM name") + + var latest: NetworkNameModel? = null + val job = underTest.networkName.onEach { latest = it }.launchIn(this) + + assertThat(latest).isEqualTo(NetworkNameModel.SimDerived("Test SIM name")) + + whenever(telephonyManager.simOperatorName).thenReturn("New SIM name") + wifiRepository.setWifiNetwork( + WifiNetworkModel.CarrierMerged( + networkId = NET_ID, + subscriptionId = SUB_ID, + level = 3, + ) + ) + + assertThat(latest).isEqualTo(NetworkNameModel.SimDerived("New SIM name")) + + job.cancel() + } + private companion object { const val SUB_ID = 123 const val NET_ID = 456 diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt index da208a7f08c9a..c02ca01cedc46 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt @@ -88,8 +88,7 @@ class FullMobileConnectionRepositoryTest : SysuiTestCase() { ) ) .thenReturn(mobileRepo) - whenever(carrierMergedFactory.build(eq(SUB_ID), any(), eq(DEFAULT_NAME))) - .thenReturn(carrierMergedRepo) + whenever(carrierMergedFactory.build(eq(SUB_ID), any())).thenReturn(carrierMergedRepo) } @Test @@ -127,7 +126,7 @@ class FullMobileConnectionRepositoryTest : SysuiTestCase() { assertThat(underTest.activeRepo.value).isEqualTo(mobileRepo) assertThat(underTest.connectionInfo.value).isEqualTo(mobileConnectionInfo) - verify(carrierMergedFactory, never()).build(SUB_ID, tableLogBuffer, DEFAULT_NAME) + verify(carrierMergedFactory, never()).build(SUB_ID, tableLogBuffer) } @Test @@ -364,9 +363,10 @@ class FullMobileConnectionRepositoryTest : SysuiTestCase() { fun connectionInfo_logging_notCarrierMerged_getsUpdates() = testScope.runTest { // SETUP: Use real repositories to verify the diffing still works. (See b/267501739.) - val telephonyManager = mock() + val telephonyManager = + mock().apply { whenever(this.simOperatorName).thenReturn("") } createRealMobileRepo(telephonyManager) - createRealCarrierMergedRepo(FakeWifiRepository()) + createRealCarrierMergedRepo(telephonyManager, FakeWifiRepository()) initializeRepo(startingIsCarrierMerged = false) @@ -401,9 +401,11 @@ class FullMobileConnectionRepositoryTest : SysuiTestCase() { fun connectionInfo_logging_carrierMerged_getsUpdates() = testScope.runTest { // SETUP: Use real repositories to verify the diffing still works. (See b/267501739.) - createRealMobileRepo(mock()) + val telephonyManager = + mock().apply { whenever(this.simOperatorName).thenReturn("") } + createRealMobileRepo(telephonyManager) val wifiRepository = FakeWifiRepository() - createRealCarrierMergedRepo(wifiRepository) + createRealCarrierMergedRepo(telephonyManager, wifiRepository) initializeRepo(startingIsCarrierMerged = true) @@ -441,11 +443,12 @@ class FullMobileConnectionRepositoryTest : SysuiTestCase() { fun connectionInfo_logging_updatesWhenCarrierMergedUpdates() = testScope.runTest { // SETUP: Use real repositories to verify the diffing still works. (See b/267501739.) - val telephonyManager = mock() + val telephonyManager = + mock().apply { whenever(this.simOperatorName).thenReturn("") } createRealMobileRepo(telephonyManager) val wifiRepository = FakeWifiRepository() - createRealCarrierMergedRepo(wifiRepository) + createRealCarrierMergedRepo(telephonyManager, wifiRepository) initializeRepo(startingIsCarrierMerged = false) @@ -516,11 +519,12 @@ class FullMobileConnectionRepositoryTest : SysuiTestCase() { fun connectionInfo_logging_doesNotLogUpdatesForNotActiveRepo() = testScope.runTest { // SETUP: Use real repositories to verify the diffing still works. (See b/267501739.) - val telephonyManager = mock() + val telephonyManager = + mock().apply { whenever(this.simOperatorName).thenReturn("") } createRealMobileRepo(telephonyManager) val wifiRepository = FakeWifiRepository() - createRealCarrierMergedRepo(wifiRepository) + createRealCarrierMergedRepo(telephonyManager, wifiRepository) // WHEN isCarrierMerged = false initializeRepo(startingIsCarrierMerged = false) @@ -617,6 +621,7 @@ class FullMobileConnectionRepositoryTest : SysuiTestCase() { } private fun createRealCarrierMergedRepo( + telephonyManager: TelephonyManager, wifiRepository: FakeWifiRepository, ): CarrierMergedConnectionRepository { wifiRepository.setIsWifiEnabled(true) @@ -625,12 +630,11 @@ class FullMobileConnectionRepositoryTest : SysuiTestCase() { CarrierMergedConnectionRepository( SUB_ID, tableLogBuffer, - defaultNetworkName = NetworkNameModel.Default("default"), + telephonyManager, testScope.backgroundScope, wifiRepository, ) - whenever(carrierMergedFactory.build(eq(SUB_ID), any(), eq(DEFAULT_NAME))) - .thenReturn(realRepo) + whenever(carrierMergedFactory.build(eq(SUB_ID), any())).thenReturn(realRepo) return realRepo } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryTest.kt index fef0981397561..76e2bc08701ed 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryTest.kt @@ -94,6 +94,7 @@ class MobileConnectionsRepositoryTest : SysuiTestCase() { @Before fun setUp() { MockitoAnnotations.initMocks(this) + whenever(telephonyManager.simOperatorName).thenReturn("") // Set up so the individual connection repositories whenever(telephonyManager.createForSubscriptionId(anyInt())).thenAnswer { invocation -> @@ -141,6 +142,7 @@ class MobileConnectionsRepositoryTest : SysuiTestCase() { ) carrierMergedFactory = CarrierMergedConnectionRepository.Factory( + telephonyManager, scope, wifiRepository, ) diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt index b9eda717dc1a5..b645e667e1839 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt @@ -45,7 +45,7 @@ class FakeMobileIconInteractor( private val _iconGroup = MutableStateFlow(TelephonyIcons.THREE_G) override val networkTypeIconGroup = _iconGroup - override val networkName = MutableStateFlow(NetworkNameModel.Derived("demo mode")) + override val networkName = MutableStateFlow(NetworkNameModel.IntentDerived("demo mode")) private val _isEmergencyOnly = MutableStateFlow(false) override val isEmergencyOnly = _isEmergencyOnly diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt index f87f651a24802..fa072fc366eb3 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt @@ -531,7 +531,7 @@ class MobileIconInteractorTest : SysuiTestCase() { ) yield() - assertThat(latest).isEqualTo(NetworkNameModel.Derived(testOperatorName)) + assertThat(latest).isEqualTo(NetworkNameModel.IntentDerived(testOperatorName)) // Default network name, operator name is null, uses the default connectionRepository.setConnectionInfo(MobileConnectionModel(operatorAlphaShort = null)) @@ -575,6 +575,6 @@ class MobileIconInteractorTest : SysuiTestCase() { private const val SUB_1_ID = 1 private val DEFAULT_NAME = NetworkNameModel.Default("test default name") - private val DERIVED_NAME = NetworkNameModel.Derived("test derived name") + private val DERIVED_NAME = NetworkNameModel.IntentDerived("test derived name") } }