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

Commit 1f6f4735 authored by Arun Voddu's avatar Arun Voddu Committed by Android (Google) Code Review
Browse files

Merge "Recreated the telephonyManager instance with valid subId after...

Merge "Recreated the telephonyManager instance with valid subId after carrierConfig loaded." into main
parents 777165b5 cd39c42e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ public class CarrierKeyDownloadManager extends Handler {
    private boolean mAllowedOverMeteredNetwork = false;
    private boolean mDeleteOldKeyAfterDownload = false;
    private boolean mIsRequiredToHandleUnlock;
    private final TelephonyManager mTelephonyManager;
    private TelephonyManager mTelephonyManager;
    private UserManager mUserManager;
    @VisibleForTesting
    public String mMccMncForDownload = "";
@@ -163,6 +163,13 @@ public class CarrierKeyDownloadManager extends Handler {
                        if ((slotIndex == mPhone.getPhoneId()) && (carrierId > 0
                                || !TextUtils.isEmpty(
                                mMccMncForDownload))) {
                            if (mTelephonyManager == null
                                    || mTelephonyManager.getSubscriptionId() != subId) {
                                logd("recreating TelManager with SubId = " + subId);
                                mTelephonyManager = mContext.getSystemService(
                                                TelephonyManager.class)
                                        .createForSubscriptionId(subId);
                            }
                            mCarrierId = carrierId;
                            updateSimOperator();
                            // If device is screen locked do not proceed to handle