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

Commit 2aea6e04 authored by Naveen Kalla's avatar Naveen Kalla Committed by android-build-merger
Browse files

Merge "Allow Android to function in single SIM mode when modem is in DSDS"

am: 0f3c1d55

Change-Id: Icc553ee9611d0529f4cd4d00f3a60885a2c86539
parents 544e391c 0f3c1d55
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -699,11 +699,13 @@ public class UiccController extends Handler {

                // sanity check: logicalSlotIndex should be valid for an active slot
                if (!isValidPhoneIndex(iss.logicalSlotIndex)) {
                    throw new RuntimeException("Logical slot index " + iss.logicalSlotIndex
                            + " invalid for physical slot " + i);
                }
                    Rlog.e(LOG_TAG, "Skipping slot " + i + " as phone " + iss.logicalSlotIndex
                               + " is not available to communicate with this slot");

                } else {
                    mPhoneIdToSlotId[iss.logicalSlotIndex] = i;
                }
            }

            if (mUiccSlots[i] == null) {
                if (VDBG) {
@@ -712,7 +714,11 @@ public class UiccController extends Handler {
                mUiccSlots[i] = new UiccSlot(mContext, isActive);
            }

            if (!isValidPhoneIndex(iss.logicalSlotIndex)) {
                mUiccSlots[i].update(null, iss);
            } else {
                mUiccSlots[i].update(isActive ? mCis[iss.logicalSlotIndex] : null, iss);
            }

            if (mUiccSlots[i].isEuicc()) {
                String eid = iss.eid;
@@ -730,8 +736,8 @@ public class UiccController extends Handler {

        // sanity check: number of active slots should be valid
        if (numActiveSlots != mPhoneIdToSlotId.length) {
            throw new RuntimeException("Number of active slots " + numActiveSlots
                    + " does not match the expected value " + mPhoneIdToSlotId.length);
            Rlog.e(LOG_TAG, "Number of active slots " + numActiveSlots
                       + " does not match the number of Phones" + mPhoneIdToSlotId.length);
        }

        // sanity check: slotIds should be unique in mPhoneIdToSlotId