summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2013-06-15 01:09:47 -0500
committerMatt Mower <mowerm@gmail.com>2013-06-16 00:42:08 -0500
commit0c5a4d9a55c6413f8762fc4538c748d5d5851fb7 (patch)
treea0b6781ac06ef30eb1e6f8d15d459d8ef29cf144 /src
parent5d2cd80f220a8dd429c437e437978bf160c0a983 (diff)
downloadframeworks_opt_telephony-0c5a4d9a55c6413f8762fc4538c748d5d5851fb7.zip
frameworks_opt_telephony-0c5a4d9a55c6413f8762fc4538c748d5d5851fb7.tar.gz
frameworks_opt_telephony-0c5a4d9a55c6413f8762fc4538c748d5d5851fb7.tar.bz2
HTCQualcommRIL: optionally ignore IccCard states greater than 2
The htc fireball (Verizon) throws CARDSTATE_NOT_INITIALIZED corresponding to card state 3. Include an option to ignore card states greater than 2 with an oldril prop. Change-Id: I7c8d5cd43af1e89e47ce777d301581d6c4bc427f
Diffstat (limited to 'src')
-rw-r--r--src/java/com/android/internal/telephony/HTCQualcommRIL.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/java/com/android/internal/telephony/HTCQualcommRIL.java b/src/java/com/android/internal/telephony/HTCQualcommRIL.java
index 11f7d0c..bd25795 100644
--- a/src/java/com/android/internal/telephony/HTCQualcommRIL.java
+++ b/src/java/com/android/internal/telephony/HTCQualcommRIL.java
@@ -41,7 +41,23 @@ public class HTCQualcommRIL extends RIL implements CommandsInterface {
@Override
protected Object
responseIccCardStatus(Parcel p) {
- Object ret = super.responseIccCardStatus(p);
+ Object ret;
+
+ boolean extraIccCardStates = needsOldRilFeature("extraicccardstates");
+
+ if (extraIccCardStates) {
+ int dataPosition = p.dataPosition();
+ int cardState = p.readInt();
+
+ if (cardState >= 3) {
+ ret = responseVoid(p);
+ } else {
+ p.setDataPosition(dataPosition);
+ ret = super.responseIccCardStatus(p);
+ }
+ } else {
+ ret = super.responseIccCardStatus(p);
+ }
// force CDMA + LTE network mode
boolean forceCdmaLte = needsOldRilFeature("forceCdmaLteNetworkType");