Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7d633b4 authored by Sooraj Sasindran's avatar Sooraj Sasindran
Browse files

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
parent 70c8685a
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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() {
+2 −6
Original line number Diff line number Diff line
@@ -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;
        }
    }
}