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

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

Update usage of UiccCardInfo API

New API returns a list instead of an array.

Bug: 122974656
Test: manual
Change-Id: I516997d7614eb03bb4a3d3989dff169f064f4613
parent 6f319694
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -954,8 +954,8 @@ public class EuiccConnector extends StateMachine implements ServiceConnection {
    private int getSlotIdFromCardId(int cardId) {
        TelephonyManager tm = (TelephonyManager)
                mContext.getSystemService(Context.TELEPHONY_SERVICE);
        UiccCardInfo[] infos = tm.getUiccCardsInfo();
        if (infos == null) {
        List<UiccCardInfo> infos = tm.getUiccCardsInfo();
        if (infos == null || infos.size() == 0) {
            return SubscriptionManager.INVALID_SIM_SLOT_INDEX;
        }
        int slotId = SubscriptionManager.INVALID_SIM_SLOT_INDEX;