Loading core/res/res/values/config.xml +5 −0 Original line number Diff line number Diff line Loading @@ -3977,6 +3977,11 @@ <item>-44</item> </integer-array> <!-- Provides default value for operator name in status bar option in setting: 0 - Hide operator name in status bar 1 - Show operator name in status bar (default) --> <integer name="config_showOperatorNameDefault">1</integer> <!-- Enabled built-in zen mode condition providers --> <string-array translatable="false" name="config_system_condition_providers"> <item>countdown</item> Loading core/res/res/values/symbols.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2691,6 +2691,9 @@ <java-symbol type="string" name="muted_by" /> <java-symbol type="string" name="zen_mode_alarm" /> <!-- For default state of operator name in status bar --> <java-symbol type="integer" name="config_showOperatorNameDefault"/> <java-symbol type="string" name="select_day" /> <java-symbol type="string" name="select_year" /> Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/OperatorNameViewControllerTest.kt +10 −0 Original line number Diff line number Diff line Loading @@ -16,10 +16,12 @@ package com.android.systemui.statusbar import android.content.res.Resources import android.telephony.ServiceState import android.telephony.SubscriptionInfo import android.telephony.TelephonyManager import android.telephony.telephonyManager import android.testing.TestableResources import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.keyguard.keyguardUpdateMonitor Loading Loading @@ -72,10 +74,18 @@ class OperatorNameViewControllerTest : SysuiTestCase() { private val airplaneModeRepository = FakeAirplaneModeRepository() private val connectivityRepository = FakeConnectivityRepository() @Mock private lateinit var resources: Resources private lateinit var testableResources: TestableResources @Before fun setup() { MockitoAnnotations.initMocks(this) testableResources = mContext.getOrCreateTestableResources() testableResources.addOverride( com.android.internal.R.integer.config_showOperatorNameDefault, 1) airplaneModeInteractor = AirplaneModeInteractor( airplaneModeRepository, Loading packages/SystemUI/src/com/android/systemui/statusbar/OperatorNameViewController.java +7 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,13 @@ public class OperatorNameViewController extends ViewController<OperatorNameView> boolean showOperatorName = mCarrierConfigTracker .getShowOperatorNameInStatusBarConfig(defaultSubInfo.getSubId()) && (mTunerService.getValue(KEY_SHOW_OPERATOR_NAME, 1) != 0); && (mTunerService.getValue( KEY_SHOW_OPERATOR_NAME, mView.getResources() .getInteger( com.android.internal.R.integer .config_showOperatorNameDefault)) != 0); mView.update( showOperatorName, mTelephonyManager.isDataCapable(), Loading Loading
core/res/res/values/config.xml +5 −0 Original line number Diff line number Diff line Loading @@ -3977,6 +3977,11 @@ <item>-44</item> </integer-array> <!-- Provides default value for operator name in status bar option in setting: 0 - Hide operator name in status bar 1 - Show operator name in status bar (default) --> <integer name="config_showOperatorNameDefault">1</integer> <!-- Enabled built-in zen mode condition providers --> <string-array translatable="false" name="config_system_condition_providers"> <item>countdown</item> Loading
core/res/res/values/symbols.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2691,6 +2691,9 @@ <java-symbol type="string" name="muted_by" /> <java-symbol type="string" name="zen_mode_alarm" /> <!-- For default state of operator name in status bar --> <java-symbol type="integer" name="config_showOperatorNameDefault"/> <java-symbol type="string" name="select_day" /> <java-symbol type="string" name="select_year" /> Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/OperatorNameViewControllerTest.kt +10 −0 Original line number Diff line number Diff line Loading @@ -16,10 +16,12 @@ package com.android.systemui.statusbar import android.content.res.Resources import android.telephony.ServiceState import android.telephony.SubscriptionInfo import android.telephony.TelephonyManager import android.telephony.telephonyManager import android.testing.TestableResources import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.keyguard.keyguardUpdateMonitor Loading Loading @@ -72,10 +74,18 @@ class OperatorNameViewControllerTest : SysuiTestCase() { private val airplaneModeRepository = FakeAirplaneModeRepository() private val connectivityRepository = FakeConnectivityRepository() @Mock private lateinit var resources: Resources private lateinit var testableResources: TestableResources @Before fun setup() { MockitoAnnotations.initMocks(this) testableResources = mContext.getOrCreateTestableResources() testableResources.addOverride( com.android.internal.R.integer.config_showOperatorNameDefault, 1) airplaneModeInteractor = AirplaneModeInteractor( airplaneModeRepository, Loading
packages/SystemUI/src/com/android/systemui/statusbar/OperatorNameViewController.java +7 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,13 @@ public class OperatorNameViewController extends ViewController<OperatorNameView> boolean showOperatorName = mCarrierConfigTracker .getShowOperatorNameInStatusBarConfig(defaultSubInfo.getSubId()) && (mTunerService.getValue(KEY_SHOW_OPERATOR_NAME, 1) != 0); && (mTunerService.getValue( KEY_SHOW_OPERATOR_NAME, mView.getResources() .getInteger( com.android.internal.R.integer .config_showOperatorNameDefault)) != 0); mView.update( showOperatorName, mTelephonyManager.isDataCapable(), Loading