Loading src/java/com/android/internal/telephony/euicc/EuiccCardController.java +17 −3 Original line number Diff line number Diff line Loading @@ -390,14 +390,28 @@ public class EuiccCardController extends IEuiccCardController.Stub { } String iccId = null; boolean isValidSlotPort = false; // get the iccid whether or not the port is active for (UiccSlot slot : mUiccController.getUiccSlots()) { if (slot.getEid().equals(cardId)) { // find the matching slot. first validate if the passing port index is valid. if (slot.isValidPortIndex(portIndex)) { isValidSlotPort = true; iccId = slot.getIccId(portIndex); } } if (iccId.isEmpty()) { } if(!isValidSlotPort) { try { callback.onComplete(EuiccCardManager.RESULT_EUICC_NOT_FOUND, null); } catch (RemoteException exception) { loge("getEnabledProfile callback failure due to invalid port slot.", exception); } return; } // if there is no iccid enabled on this port, return null. if (TextUtils.isEmpty(iccId)) { try { callback.onComplete(EuiccCardManager.RESULT_PROFILE_NOT_FOUND, null); } catch (RemoteException exception) { Loading src/java/com/android/internal/telephony/uicc/UiccSlot.java +5 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,11 @@ public class UiccSlot extends Handler { } } /** Return whether the passing portIndex belong to this physical slot */ public boolean isValidPortIndex(int portIndex) { return mPortIdxToPhoneId.containsKey(portIndex); } public int getPortIndexFromPhoneId(int phoneId) { synchronized (mLock) { for (Map.Entry<Integer, Integer> entry : mPortIdxToPhoneId.entrySet()) { Loading Loading
src/java/com/android/internal/telephony/euicc/EuiccCardController.java +17 −3 Original line number Diff line number Diff line Loading @@ -390,14 +390,28 @@ public class EuiccCardController extends IEuiccCardController.Stub { } String iccId = null; boolean isValidSlotPort = false; // get the iccid whether or not the port is active for (UiccSlot slot : mUiccController.getUiccSlots()) { if (slot.getEid().equals(cardId)) { // find the matching slot. first validate if the passing port index is valid. if (slot.isValidPortIndex(portIndex)) { isValidSlotPort = true; iccId = slot.getIccId(portIndex); } } if (iccId.isEmpty()) { } if(!isValidSlotPort) { try { callback.onComplete(EuiccCardManager.RESULT_EUICC_NOT_FOUND, null); } catch (RemoteException exception) { loge("getEnabledProfile callback failure due to invalid port slot.", exception); } return; } // if there is no iccid enabled on this port, return null. if (TextUtils.isEmpty(iccId)) { try { callback.onComplete(EuiccCardManager.RESULT_PROFILE_NOT_FOUND, null); } catch (RemoteException exception) { Loading
src/java/com/android/internal/telephony/uicc/UiccSlot.java +5 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,11 @@ public class UiccSlot extends Handler { } } /** Return whether the passing portIndex belong to this physical slot */ public boolean isValidPortIndex(int portIndex) { return mPortIdxToPhoneId.containsKey(portIndex); } public int getPortIndexFromPhoneId(int phoneId) { synchronized (mLock) { for (Map.Entry<Integer, Integer> entry : mPortIdxToPhoneId.entrySet()) { Loading