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

Commit b169eec9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "MSIM: Consider phone count value while creating UiccSlot objects"

parents 46e48754 99e19978
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();