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

Commit ee769f5a authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Treat slot idx used for remote sim as valid where needed.

Test: sanity, unit tests
Bug: 123300875
Change-Id: Ibe73eb86923dda455d45ab2ffcfd04fae200344e
parent c6645cd8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1764,9 +1764,10 @@ public class SubscriptionController extends ISub.Stub {
            if (VDBG) logd("[getSubId] map default slotIndex=" + slotIndex);
        }

        // Check that we have a valid slotIndex
        // TODO b/123300875 This check should probably be removed once tests are fixed
        if (!SubscriptionManager.isValidSlotIndex(slotIndex)) {
        // Check that we have a valid slotIndex or the slotIndex is for a remote SIM (remote SIM
        // uses special slot index that may be invalid otherwise)
        if (!SubscriptionManager.isValidSlotIndex(slotIndex)
                && slotIndex != SubscriptionManager.SLOT_INDEX_FOR_REMOTE_SIM_SUB) {
            if (DBG) logd("[getSubId]- invalid slotIndex=" + slotIndex);
            return null;
        }