diff options
author | Matt Mower <mowerm@gmail.com> | 2013-06-15 01:09:47 -0500 |
---|---|---|
committer | Matt Mower <mowerm@gmail.com> | 2013-06-16 00:42:08 -0500 |
commit | 0c5a4d9a55c6413f8762fc4538c748d5d5851fb7 (patch) | |
tree | a0b6781ac06ef30eb1e6f8d15d459d8ef29cf144 | |
parent | 5d2cd80f220a8dd429c437e437978bf160c0a983 (diff) | |
download | frameworks_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
-rw-r--r-- | src/java/com/android/internal/telephony/HTCQualcommRIL.java | 18 |
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"); |