Make sure to read the opportunistic carrier display property
Make sure to read the opportunistic carrier display property Bug: 131849855 Test: verified that carrier text is displayed correctly Change-Id: I93f9da8d0a9a8dae276370a0cca2df889229d4c3
This commit is contained in:
@@ -174,6 +174,9 @@ public class CarrierTextController {
|
||||
mSimSlotsNumber = ((TelephonyManager) context.getSystemService(
|
||||
Context.TELEPHONY_SERVICE)).getPhoneCount();
|
||||
mSimErrorState = new boolean[mSimSlotsNumber];
|
||||
updateDisplayOpportunisticSubscriptionCarrierText(SystemProperties.getBoolean(
|
||||
TelephonyProperties.DISPLAY_OPPORTUNISTIC_SUBSCRIPTION_CARRIER_TEXT_PROPERTY_NAME,
|
||||
false));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -282,10 +285,8 @@ public class CarrierTextController {
|
||||
*
|
||||
*/
|
||||
@VisibleForTesting
|
||||
public void updateDisplayOpportunisticSubscriptionCarrierText() {
|
||||
mDisplayOpportunisticSubscriptionCarrierText = SystemProperties
|
||||
.getBoolean(TelephonyProperties
|
||||
.DISPLAY_OPPORTUNISTIC_SUBSCRIPTION_CARRIER_TEXT_PROPERTY_NAME, false);
|
||||
public void updateDisplayOpportunisticSubscriptionCarrierText(boolean isEnable) {
|
||||
mDisplayOpportunisticSubscriptionCarrierText = isEnable;
|
||||
}
|
||||
|
||||
protected List<SubscriptionInfo> getSubscriptionInfo() {
|
||||
|
||||
@@ -118,6 +118,7 @@ public class CarrierTextControllerTest extends SysuiTestCase {
|
||||
mKeyguardUpdateMonitor);
|
||||
// This should not start listening on any of the real dependencies
|
||||
mCarrierTextController.setListening(mCarrierTextCallback);
|
||||
mCarrierTextController.updateDisplayOpportunisticSubscriptionCarrierText(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -358,7 +359,7 @@ public class CarrierTextControllerTest extends SysuiTestCase {
|
||||
.thenReturn(IccCardConstants.State.READY);
|
||||
|
||||
mKeyguardUpdateMonitor.mServiceStates = new HashMap<>();
|
||||
mCarrierTextController.updateDisplayOpportunisticSubscriptionCarrierText();
|
||||
mCarrierTextController.updateDisplayOpportunisticSubscriptionCarrierText(true);
|
||||
when(mSubscriptionManager.getActiveSubscriptionInfoList(anyBoolean())).thenReturn(list);
|
||||
|
||||
ArgumentCaptor<CarrierTextController.CarrierTextCallbackInfo> captor =
|
||||
@@ -386,10 +387,5 @@ public class CarrierTextControllerTest extends SysuiTestCase {
|
||||
super.setListening(callback);
|
||||
mKeyguardUpdateMonitor = mKUM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDisplayOpportunisticSubscriptionCarrierText() {
|
||||
mDisplayOpportunisticSubscriptionCarrierText = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user