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

Commit 65e82d6c authored by Naveen Kalla's avatar Naveen Kalla
Browse files

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

Remove checks and exceptions in Android that were put in place
to avoid modem being in multi-SIM mode when Android is in
single SIM mode.

Test: Boot up device with modem in dual SIM and android in single SIM
Bug: 122119277
Merged-In: I073840a10ff8b3c77160f83279aeb9b6650d05e0
Change-Id: I073840a10ff8b3c77160f83279aeb9b6650d05e0
parent 7a580e32
Loading
Loading
Loading
Loading
+12 −6
Original line number Original line Diff line number Diff line
@@ -699,11 +699,13 @@ public class UiccController extends Handler {


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

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


            if (mUiccSlots[i] == null) {
            if (mUiccSlots[i] == null) {
                if (VDBG) {
                if (VDBG) {
@@ -712,7 +714,11 @@ public class UiccController extends Handler {
                mUiccSlots[i] = new UiccSlot(mContext, isActive);
                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);
                mUiccSlots[i].update(isActive ? mCis[iss.logicalSlotIndex] : null, iss);
            }


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


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


        // sanity check: slotIds should be unique in mPhoneIdToSlotId
        // sanity check: slotIds should be unique in mPhoneIdToSlotId