summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorJohn Wang <johnwang@google.com>2011-02-14 17:36:42 -0800
committerJohn Wang <johnwang@google.com>2011-02-14 17:44:13 -0800
commitc2cbc730fcb051c1a12897ec29fbe0280a536f53 (patch)
treef8e570e768add354c4793d8e478fc6bc7c6c9683 /telephony/java
parentd49523809714b04636a9ac43de1c508ed1dbfc38 (diff)
downloadframeworks_base-c2cbc730fcb051c1a12897ec29fbe0280a536f53.zip
frameworks_base-c2cbc730fcb051c1a12897ec29fbe0280a536f53.tar.gz
frameworks_base-c2cbc730fcb051c1a12897ec29fbe0280a536f53.tar.bz2
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
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/UsimPhoneBookManager.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/UsimPhoneBookManager.java b/telephony/java/com/android/internal/telephony/gsm/UsimPhoneBookManager.java
index 41e527c..6458fda 100644
--- a/telephony/java/com/android/internal/telephony/gsm/UsimPhoneBookManager.java
+++ b/telephony/java/com/android/internal/telephony/gsm/UsimPhoneBookManager.java
@@ -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) {