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

Commit c3cfb0f7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 13ea64b9 b7d633b4
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;
        }
    }
}