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

Commit 99e19978 authored by Sandeep Gutta's avatar Sandeep Gutta
Browse files

MSIM: Consider phone count value while creating UiccSlot objects

Test: Manual - DSDS and Single SIM boot-up scenarios
Change-Id: I4899777db5bd8165c033f9d24adfc89545bf0b09
parent 660aba4a
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -145,8 +145,15 @@ public class UiccController extends Handler {
            log("config_num_physical_slots = " + c.getResources().getInteger(
                    com.android.internal.R.integer.config_num_physical_slots));
        }
        mUiccSlots = new UiccSlot[c.getResources().getInteger(
                com.android.internal.R.integer.config_num_physical_slots)];
        int numPhysicalSlots = c.getResources().getInteger(
                com.android.internal.R.integer.config_num_physical_slots);
        // Minimum number of physical slot count should be equals to or greater than phone count,
        // if it is less than phone count use phone count as physical slot count.
        if (numPhysicalSlots < mCis.length) {
            numPhysicalSlots = mCis.length;
        }

        mUiccSlots = new UiccSlot[numPhysicalSlots];
        mPhoneIdToSlotId = new int[ci.length];
        Arrays.fill(mPhoneIdToSlotId, INVALID_SLOT_ID);
        if (VDBG) logPhoneIdToSlotIdMapping();