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

Commit bd17b573 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 7563ece3 eab58cdd
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -695,11 +695,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) {
@@ -708,7 +710,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;
@@ -726,8 +732,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