void parseEf(SimTlv tlv, Map<Integer, Integer> val, int parentTag) {
   int tag;
   byte[] data;
   int tagNumberWithinParentTag = 0;
   do {
     tag = tlv.getTag();
     if (parentTag == USIM_TYPE2_TAG && tag == USIM_EFEMAIL_TAG) {
       mEmailPresentInIap = true;
       mEmailTagNumberInIap = tagNumberWithinParentTag;
     }
     if (parentTag == USIM_TYPE2_TAG && tag == USIM_EFANR_TAG) {
       mAnrPresentInIap = true;
       mAnrTagNumberInIap = tagNumberWithinParentTag;
     }
     switch (tag) {
       case USIM_EFEMAIL_TAG:
       case USIM_EFADN_TAG:
       case USIM_EFEXT1_TAG:
       case USIM_EFANR_TAG:
       case USIM_EFPBC_TAG:
       case USIM_EFGRP_TAG:
       case USIM_EFAAS_TAG:
       case USIM_EFGSD_TAG:
       case USIM_EFUID_TAG:
       case USIM_EFCCP1_TAG:
       case USIM_EFIAP_TAG:
       case USIM_EFSNE_TAG:
         data = tlv.getData();
         int efid = ((data[0] & 0xFF) << 8) | (data[1] & 0xFF);
         val.put(tag, efid);
         break;
     }
     tagNumberWithinParentTag++;
   } while (tlv.nextObject());
 }
 void parseTag(SimTlv tlv, int recNum) {
   SimTlv tlvEf;
   int tag;
   byte[] data;
   Map<Integer, Integer> val = new HashMap<Integer, Integer>();
   do {
     tag = tlv.getTag();
     switch (tag) {
       case USIM_TYPE1_TAG: // A8
       case USIM_TYPE3_TAG: // AA
       case USIM_TYPE2_TAG: // A9
         data = tlv.getData();
         tlvEf = new SimTlv(data, 0, data.length);
         parseEf(tlvEf, val, tag);
         break;
     }
   } while (tlv.nextObject());
   mFileIds.put(recNum, val);
 }