Merge "Avoid wrong telephonymanager with wrong sub id." into rvc-qpr-dev
This commit is contained in:
@@ -228,7 +228,8 @@ public class SimStatusDialogController implements LifecycleObserver, OnResume, O
|
||||
if (mSubscriptionInfo == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
mTelephonyManager =
|
||||
mTelephonyManager.createForSubscriptionId(mSubscriptionInfo.getSubscriptionId());
|
||||
mPhoneStateListener = getPhoneStateListener();
|
||||
updateLatestAreaInfo();
|
||||
updateSubscriptionStatus();
|
||||
|
@@ -162,6 +162,8 @@ public class SimStatusDialogControllerTest {
|
||||
doReturn(null).when(mSignalStrength).getCellSignalStrengths();
|
||||
doReturn(mPhoneStateListener).when(mController).getPhoneStateListener();
|
||||
doReturn(mSubscriptionInfo).when(mSubscriptionManager).getActiveSubscriptionInfo(anyInt());
|
||||
when(mSubscriptionInfo.getSubscriptionId())
|
||||
.thenReturn(SubscriptionManager.DEFAULT_SUBSCRIPTION_ID);
|
||||
|
||||
ReflectionHelpers.setField(mController, "mTelephonyManager", mTelephonyManager);
|
||||
ReflectionHelpers.setField(mController, "mCarrierConfigManager", mCarrierConfigManager);
|
||||
|
Reference in New Issue
Block a user