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

Commit 587c4f39 authored by Sooraj Sasindran's avatar Sooraj Sasindran Committed by android-build-merger
Browse files

Merge "Make sure to read the opportunistic carrier display property" into qt-dev

am: c3cfb0f7

Change-Id: I02d28ceaf8e59347ac81a80e8cb827e1354c5268
parents 80f163aa c3cfb0f7
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;
        }
    }
}