summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-05-04 00:27:22 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-05-04 00:27:22 +0000
commitc3cfb0f70208fdca0dc986b812f35e0d6a3ddf2c (patch)
treea07433984840f81798acb9b02313767ca0f1baaf
parent13ea64b9065c17b68cd38a0ca8f4de8bb14ae4d1 (diff)
parentb7d633b4a63088cdfa6f9262065d5e39b1a3fb25 (diff)
Merge "Make sure to read the opportunistic carrier display property" into qt-dev
-rw-r--r--packages/SystemUI/src/com/android/keyguard/CarrierTextController.java9
-rw-r--r--packages/SystemUI/tests/src/com/android/keyguard/CarrierTextControllerTest.java8
2 files changed, 7 insertions, 10 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/CarrierTextController.java b/packages/SystemUI/src/com/android/keyguard/CarrierTextController.java
index 12d1f7c3118d..c407ba8abf22 100644
--- a/packages/SystemUI/src/com/android/keyguard/CarrierTextController.java
+++ b/packages/SystemUI/src/com/android/keyguard/CarrierTextController.java
@@ -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() {
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextControllerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextControllerTest.java
index e312990c7f8e..db45ad788bfc 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextControllerTest.java
@@ -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;
- }
}
}