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

Commit a5ad00d8 authored by Jordan Liu's avatar Jordan Liu
Browse files

Map UNINITIALIZED to invalid slot

EuiccConnector may be reached from SubscriptionInfoUpdater, in which
case it might be passed an UNINITIALIZED card ID. If this happens, we
should convert it to slot -1.

Bug: 125358695
Test: manual
Change-Id: I7919f5e91d372bb4f906479503f2e65c49b695d6
parent 932b96e1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -953,7 +953,8 @@ public class EuiccConnector extends StateMachine implements ServiceConnection {
     * Gets the slot ID from the card ID.
     */
    private int getSlotIdFromCardId(int cardId) {
        if (cardId == TelephonyManager.UNSUPPORTED_CARD_ID) {
        if (cardId == TelephonyManager.UNSUPPORTED_CARD_ID
                || cardId == TelephonyManager.UNINITIALIZED_CARD_ID) {
            return SubscriptionManager.INVALID_SIM_SLOT_INDEX;
        }
        TelephonyManager tm = (TelephonyManager)