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

Commit 94cd9454 authored by Jordan Liu's avatar Jordan Liu
Browse files

Invalid card ID should map to invalid slot

Fixes: 123715741
Bug: 123576475
Test: manual
Change-Id: Ie8bfa0cf04e091bb109f5cb925b209983262cd10
parent d5e1b261
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -954,6 +954,9 @@ public class EuiccConnector extends StateMachine implements ServiceConnection {
     * Gets the slot ID from the card ID.
     */
    private int getSlotIdFromCardId(int cardId) {
        if (cardId == TelephonyManager.INVALID_CARD_ID) {
            return SubscriptionManager.INVALID_SIM_SLOT_INDEX;
        }
        TelephonyManager tm = (TelephonyManager)
                mContext.getSystemService(Context.TELEPHONY_SERVICE);
        List<UiccCardInfo> infos = tm.getUiccCardsInfo();