From 036e21083d9936425687d7de29e95b2c458a7e4a Mon Sep 17 00:00:00 2001 From: jsh Date: Thu, 21 Jan 2010 16:58:17 -0800 Subject: Fix NPE when importing from USIM. Need to check if fileIds is empty. b/2349232 --- .../java/com/android/internal/telephony/gsm/UsimPhoneBookManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'telephony/java') diff --git a/telephony/java/com/android/internal/telephony/gsm/UsimPhoneBookManager.java b/telephony/java/com/android/internal/telephony/gsm/UsimPhoneBookManager.java index d27f240..9caae3d 100644 --- a/telephony/java/com/android/internal/telephony/gsm/UsimPhoneBookManager.java +++ b/telephony/java/com/android/internal/telephony/gsm/UsimPhoneBookManager.java @@ -282,7 +282,7 @@ public class UsimPhoneBookManager extends Handler implements IccConstants { private void readAdnFileAndWait(int recNum) { Map fileIds; fileIds = mPbrFile.mFileIds.get(recNum); - if (fileIds == null) return; + if (fileIds == null || fileIds.isEmpty()) return; mAdnCache.requestLoadAllAdnLike(fileIds.get(USIM_EFADN_TAG), fileIds.get(USIM_EFEXT1_TAG), obtainMessage(EVENT_USIM_ADN_LOAD_DONE)); -- cgit v1.1