Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/SystemUiCarrierConfig.kt +7 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.statusbar.pipeline.mobile.data.model import android.os.PersistableBundle import android.telephony.CarrierConfigManager.KEY_INFLATE_SIGNAL_STRENGTH_BOOL import android.telephony.CarrierConfigManager.KEY_SHOW_5G_SLICE_ICON_BOOL import android.telephony.CarrierConfigManager.KEY_SHOW_OPERATOR_NAME_IN_STATUSBAR_BOOL import androidx.annotation.VisibleForTesting import kotlinx.coroutines.flow.MutableStateFlow Loading Loading @@ -66,10 +67,16 @@ internal constructor( /** Flow tracking the [KEY_SHOW_OPERATOR_NAME_IN_STATUSBAR_BOOL] config */ val showOperatorNameInStatusBar: StateFlow<Boolean> = showOperatorName.config private val showNetworkSlice = BooleanCarrierConfig(KEY_SHOW_5G_SLICE_ICON_BOOL, defaultConfig) /** Flow tracking the [KEY_SHOW_5G_SLICE_ICON_BOOL] config */ val allowNetworkSliceIndicator: StateFlow<Boolean> = showNetworkSlice.config private val trackedConfigs = listOf( inflateSignalStrength, showOperatorName, showNetworkSlice, ) /** Ingest a new carrier config, and switch all of the tracked keys over to the new values */ Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionRepository.kt +3 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,9 @@ interface MobileConnectionRepository { /** Reflects the value from the carrier config INFLATE_SIGNAL_STRENGTH for this connection */ val inflateSignalStrength: StateFlow<Boolean> /** Carrier config KEY_SHOW_5G_SLICE_ICON_BOOL for this connection */ val allowNetworkSliceIndicator: StateFlow<Boolean> /** * The table log buffer created for this connection. Will have the name "MobileConnectionLog * [subId]" Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionRepository.kt +3 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ class DemoMobileConnectionRepository( ) .stateIn(scope, SharingStarted.WhileSubscribed(), _inflateSignalStrength.value) // I don't see a reason why we would turn the config off for demo mode. override val allowNetworkSliceIndicator = MutableStateFlow(true) private val _isEmergencyOnly = MutableStateFlow(false) override val isEmergencyOnly = _isEmergencyOnly Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepository.kt +1 −0 Original line number Diff line number Diff line Loading @@ -166,6 +166,7 @@ class CarrierMergedConnectionRepository( override val isRoaming = MutableStateFlow(false).asStateFlow() override val carrierId = MutableStateFlow(INVALID_SUBSCRIPTION_ID).asStateFlow() override val inflateSignalStrength = MutableStateFlow(false).asStateFlow() override val allowNetworkSliceIndicator = MutableStateFlow(false).asStateFlow() override val isEmergencyOnly = MutableStateFlow(false).asStateFlow() override val operatorAlphaShort = MutableStateFlow(null).asStateFlow() override val isInService = MutableStateFlow(true).asStateFlow() Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepository.kt +15 −0 Original line number Diff line number Diff line Loading @@ -308,6 +308,21 @@ class FullMobileConnectionRepository( activeRepo.value.inflateSignalStrength.value ) override val allowNetworkSliceIndicator = activeRepo .flatMapLatest { it.allowNetworkSliceIndicator } .logDiffsForTable( tableLogBuffer, columnPrefix = "", columnName = "allowSlice", initialValue = activeRepo.value.allowNetworkSliceIndicator.value, ) .stateIn( scope, SharingStarted.WhileSubscribed(), activeRepo.value.allowNetworkSliceIndicator.value ) override val numberOfLevels = activeRepo .flatMapLatest { it.numberOfLevels } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/SystemUiCarrierConfig.kt +7 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.statusbar.pipeline.mobile.data.model import android.os.PersistableBundle import android.telephony.CarrierConfigManager.KEY_INFLATE_SIGNAL_STRENGTH_BOOL import android.telephony.CarrierConfigManager.KEY_SHOW_5G_SLICE_ICON_BOOL import android.telephony.CarrierConfigManager.KEY_SHOW_OPERATOR_NAME_IN_STATUSBAR_BOOL import androidx.annotation.VisibleForTesting import kotlinx.coroutines.flow.MutableStateFlow Loading Loading @@ -66,10 +67,16 @@ internal constructor( /** Flow tracking the [KEY_SHOW_OPERATOR_NAME_IN_STATUSBAR_BOOL] config */ val showOperatorNameInStatusBar: StateFlow<Boolean> = showOperatorName.config private val showNetworkSlice = BooleanCarrierConfig(KEY_SHOW_5G_SLICE_ICON_BOOL, defaultConfig) /** Flow tracking the [KEY_SHOW_5G_SLICE_ICON_BOOL] config */ val allowNetworkSliceIndicator: StateFlow<Boolean> = showNetworkSlice.config private val trackedConfigs = listOf( inflateSignalStrength, showOperatorName, showNetworkSlice, ) /** Ingest a new carrier config, and switch all of the tracked keys over to the new values */ Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionRepository.kt +3 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,9 @@ interface MobileConnectionRepository { /** Reflects the value from the carrier config INFLATE_SIGNAL_STRENGTH for this connection */ val inflateSignalStrength: StateFlow<Boolean> /** Carrier config KEY_SHOW_5G_SLICE_ICON_BOOL for this connection */ val allowNetworkSliceIndicator: StateFlow<Boolean> /** * The table log buffer created for this connection. Will have the name "MobileConnectionLog * [subId]" Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionRepository.kt +3 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ class DemoMobileConnectionRepository( ) .stateIn(scope, SharingStarted.WhileSubscribed(), _inflateSignalStrength.value) // I don't see a reason why we would turn the config off for demo mode. override val allowNetworkSliceIndicator = MutableStateFlow(true) private val _isEmergencyOnly = MutableStateFlow(false) override val isEmergencyOnly = _isEmergencyOnly Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepository.kt +1 −0 Original line number Diff line number Diff line Loading @@ -166,6 +166,7 @@ class CarrierMergedConnectionRepository( override val isRoaming = MutableStateFlow(false).asStateFlow() override val carrierId = MutableStateFlow(INVALID_SUBSCRIPTION_ID).asStateFlow() override val inflateSignalStrength = MutableStateFlow(false).asStateFlow() override val allowNetworkSliceIndicator = MutableStateFlow(false).asStateFlow() override val isEmergencyOnly = MutableStateFlow(false).asStateFlow() override val operatorAlphaShort = MutableStateFlow(null).asStateFlow() override val isInService = MutableStateFlow(true).asStateFlow() Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepository.kt +15 −0 Original line number Diff line number Diff line Loading @@ -308,6 +308,21 @@ class FullMobileConnectionRepository( activeRepo.value.inflateSignalStrength.value ) override val allowNetworkSliceIndicator = activeRepo .flatMapLatest { it.allowNetworkSliceIndicator } .logDiffsForTable( tableLogBuffer, columnPrefix = "", columnName = "allowSlice", initialValue = activeRepo.value.allowNetworkSliceIndicator.value, ) .stateIn( scope, SharingStarted.WhileSubscribed(), activeRepo.value.allowNetworkSliceIndicator.value ) override val numberOfLevels = activeRepo .flatMapLatest { it.numberOfLevels } Loading