Only decode EXT1 tag when it is available.

Normally ADN record is stored in two tags, EFADN_TAG and EFEXT1_TAG. But if the EFEXT1_TAG is not set in EF_PBR entry,
it shouldn't be decoded otherwise it causes NullPointerException in readAdnFileAndWait().

bug: 3376954
Change-Id: I744cf5cb8662c75be1e7c6219fa92c67bdda82f2
This commit is contained in:
John Wang
2011-02-14 17:36:42 -08:00
parent d495238097
commit c2cbc730fc

View File

@@ -284,8 +284,15 @@ public class UsimPhoneBookManager extends Handler implements IccConstants {
fileIds = mPbrFile.mFileIds.get(recNum);
if (fileIds == null || fileIds.isEmpty()) return;
int extEf = 0;
// Only call fileIds.get while EFEXT1_TAG is available
if (fileIds.containsKey(USIM_EFEXT1_TAG)) {
extEf = fileIds.get(USIM_EFEXT1_TAG);
}
mAdnCache.requestLoadAllAdnLike(fileIds.get(USIM_EFADN_TAG),
fileIds.get(USIM_EFEXT1_TAG), obtainMessage(EVENT_USIM_ADN_LOAD_DONE));
extEf, obtainMessage(EVENT_USIM_ADN_LOAD_DONE));
try {
mLock.wait();
} catch (InterruptedException e) {