diff options
author | Wink Saville <wink@google.com> | 2010-12-09 14:06:35 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-12-09 14:06:35 -0800 |
commit | 41cb9d10de37fd05277288d2f01ad74ac11d2edf (patch) | |
tree | b444bd870fbb7a36d9f999e6a25a3837c743feae /telephony | |
parent | ed6f095a83af9477d37e67a29762baf30ea97723 (diff) | |
parent | a740413022baca3d2bc365ade40f73a1fee46654 (diff) | |
download | frameworks_base-41cb9d10de37fd05277288d2f01ad74ac11d2edf.zip frameworks_base-41cb9d10de37fd05277288d2f01ad74ac11d2edf.tar.gz frameworks_base-41cb9d10de37fd05277288d2f01ad74ac11d2edf.tar.bz2 |
am a7404130: am d0ffef4b: am 19b23afa: Merge "Fix for phone app crash in Icc Card."
* commit 'a740413022baca3d2bc365ade40f73a1fee46654':
Fix for phone app crash in Icc Card.
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/com/android/internal/telephony/IccCard.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/telephony/java/com/android/internal/telephony/IccCard.java b/telephony/java/com/android/internal/telephony/IccCard.java index 90f9e8c..e270ce9 100644 --- a/telephony/java/com/android/internal/telephony/IccCard.java +++ b/telephony/java/com/android/internal/telephony/IccCard.java @@ -487,6 +487,12 @@ public abstract class IccCard { CommandsInterface.SERVICE_CLASS_DATA + CommandsInterface.SERVICE_CLASS_FAX; + if (!mPhone.mIsTheCurrentActivePhone) { + Log.e(mLogTag, "Received message " + msg + "[" + msg.what + + "] while being destroyed. Ignoring."); + return; + } + switch (msg.what) { case EVENT_RADIO_OFF_OR_NOT_AVAILABLE: mState = null; @@ -626,7 +632,13 @@ public abstract class IccCard { index = mIccCardStatus.getGsmUmtsSubscriptionAppIndex(); } - IccCardApplication app = mIccCardStatus.getApplication(index); + IccCardApplication app; + if (index >= 0 && index < IccCardStatus.CARD_MAX_APPS) { + app = mIccCardStatus.getApplication(index); + } else { + Log.e(mLogTag, "[IccCard] Invalid Subscription Application index:" + index); + return IccCard.State.ABSENT; + } if (app == null) { Log.e(mLogTag, "[IccCard] Subscription Application in not present"); |