summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiogo Ferreira <defer@cyanogenmod.com>2011-10-12 20:50:46 +0100
committerDiogo Ferreira <defer@cyanogenmod.com>2011-10-24 08:56:12 +0100
commit5786e6761ed88ce7e1c6d4c022eee7cf2c99102b (patch)
treed06edd0d3ca83a13dd39ffaf2c101739526c7b59
parentb1e3244965cb9a51ff7675c3aceaaf1c99e25cc8 (diff)
downloadandroid_frameworks_base-gingerbread-release.tar.gz
android_frameworks_base-gingerbread-release.tar.bz2
android_frameworks_base-gingerbread-release.zip
SemcRIL: Improve AID selectiongingerbread-release
Our current AID selection schema will always select the last application available in the card. This is not an acceptable behavior and worked for so long because most cards only have a single application. This patch adds a more robust detection of AIDs which will fix problems. Change-Id: I46044f5797993407481d3dd876c4fc643772e75a
-rw-r--r--telephony/java/com/android/internal/telephony/SemcRIL.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/telephony/java/com/android/internal/telephony/SemcRIL.java b/telephony/java/com/android/internal/telephony/SemcRIL.java
index a9073786f0e..d87853a3407 100644
--- a/telephony/java/com/android/internal/telephony/SemcRIL.java
+++ b/telephony/java/com/android/internal/telephony/SemcRIL.java
@@ -384,8 +384,18 @@ public class SemcRIL extends QualcommNoSimReadyRIL implements CommandsInterface
ca.pin2 = p.readInt();
status.addApplication(ca);
- mAid = ca.aid;
}
+ int appIndex = -1;
+ if (mPhoneType == RILConstants.CDMA_PHONE) {
+ appIndex = status.getCdmaSubscriptionAppIndex();
+ Log.d(LOG_TAG, "This is a CDMA PHONE " + appIndex);
+ } else {
+ appIndex = status.getGsmUmtsSubscriptionAppIndex();
+ Log.d(LOG_TAG, "This is a GSM PHONE " + appIndex);
+ }
+
+ IccCardApplication application = status.getApplication(appIndex);
+ mAid = application.aid;
return status;
}