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

Commit a835609b authored by tom hsu's avatar tom hsu Committed by Automerger Merge Worker
Browse files

Avoid wrong telephonymanager with wrong sub id. am: ba845f7f am: 8249689a

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13422724

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If14458d1aeaae0df381f12d32f492e529614d540
parents 6c495776 8249689a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -233,7 +233,8 @@ public class SimStatusDialogController implements LifecycleObserver {
        if (mSubscriptionInfo == null) {
            return;
        }

        mTelephonyManager =
            mTelephonyManager.createForSubscriptionId(mSubscriptionInfo.getSubscriptionId());
        mPhoneStateListener = getPhoneStateListener();
        updateLatestAreaInfo();
        updateSubscriptionStatus();
+1 −1
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ public class SimStatusDialogControllerTest {
        when(mContext.getSystemService(SubscriptionManager.class)).thenReturn(mSubscriptionManager);

        doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(
                SubscriptionManager.DEFAULT_SUBSCRIPTION_ID);
                anyInt());
        doReturn(2).when(mTelephonyManager).getCardIdForDefaultEuicc();
        doReturn(TelephonyManager.NETWORK_TYPE_LTE).when(mTelephonyManager).getDataNetworkType();