summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2010-12-09 13:58:26 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2010-12-09 13:58:26 -0800
commitd0ffef4b43594e540cb867da18d4403b4f583622 (patch)
tree60541e549d26ed066a854d29a1e47455386bc655 /telephony/java
parentd9c17cc1178bc09d30eead05bf5be7ec5a05cbe7 (diff)
parent19b23afadf1053a8e06cb3444d9cdae3405ad9a1 (diff)
downloadframeworks_base-d0ffef4b43594e540cb867da18d4403b4f583622.zip
frameworks_base-d0ffef4b43594e540cb867da18d4403b4f583622.tar.gz
frameworks_base-d0ffef4b43594e540cb867da18d4403b4f583622.tar.bz2
am 19b23afa: Merge "Fix for phone app crash in Icc Card."
* commit '19b23afadf1053a8e06cb3444d9cdae3405ad9a1': Fix for phone app crash in Icc Card.
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/com/android/internal/telephony/IccCard.java14
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");