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

Commit 7a6936f1 authored by Malcolm Chen's avatar Malcolm Chen Committed by Xiangyu/Malcolm Chen
Browse files

In CarrierTextController replace getPhoneCount with getMaxPhoneCount.

As first step for smooth single SIM to DSDS switch, for DSDS capable
deviced we always allocate objects as if it's in DSDS mode.

Bug: 141388730
Test: unittest and manual

Change-Id: I141689fc55063d87f4f7e5c605a461517beeabe4
parent 80fe541d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ public class CarrierTextController {
        mSeparator = separator;
        mWakefulnessLifecycle = Dependency.get(WakefulnessLifecycle.class);
        mSimSlotsNumber = ((TelephonyManager) context.getSystemService(
                Context.TELEPHONY_SERVICE)).getPhoneCount();
                Context.TELEPHONY_SERVICE)).getMaxPhoneCount();
        mSimErrorState = new boolean[mSimSlotsNumber];
    }

+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ public class CarrierTextControllerTest extends SysuiTestCase {

        mCarrierTextCallbackInfo = new CarrierTextController.CarrierTextCallbackInfo("",
                new CharSequence[]{}, false, new int[]{});
        when(mTelephonyManager.getPhoneCount()).thenReturn(3);
        when(mTelephonyManager.getMaxPhoneCount()).thenReturn(3);

        mCarrierTextController = new TestCarrierTextController(mContext, SEPARATOR, true, true,
                mKeyguardUpdateMonitor);