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
This commit is contained in:
Malcolm Chen
2019-09-23 16:04:51 -07:00
committed by Xiangyu/Malcolm Chen
parent 80fe541dea
commit 7a6936f172
2 changed files with 2 additions and 2 deletions

View File

@@ -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];
}

View File

@@ -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);