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

Commit 66851e74 authored by Thomas Wendt's avatar Thomas Wendt Committed by Nolen Johnson
Browse files

Skip unknown tags instead of aborting when parsing UICC TLV data

This fixes issues like broken mobile data and no outgoing calls for SIM
cards that return unkown tags (at least F1 has been seen in the wild).

Change-Id: I4fe5ddc7992b1b3bb025f2a5f9e2b3f410d54841
parent e335f537
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
package com.android.internal.telephony.uicc;

import android.telephony.Rlog;

/**
 * UICC TLV Data Parser according to ETSI TS 102 221 spec.
 */
public class UiccTlvData {
    private static final String LOG_TAG = "UiccTlvData";

    private static final int TLV_FORMAT_ID = 0x62;

@@ -82,9 +85,9 @@ public class UiccTlvData {
                        break;

                    default:
                        //Unknown TAG
                        throw new IccFileTypeMismatch();

                        Rlog.d(LOG_TAG, "Unknown tag 0x" + String.format("%02X", currentTag));
                        currentLocation = parsedData.parseSomeTag(data, currentLocation);
                        break;
                }
            }