From 0c5a4d9a55c6413f8762fc4538c748d5d5851fb7 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Sat, 15 Jun 2013 01:09:47 -0500 Subject: 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 --- .../com/android/internal/telephony/HTCQualcommRIL.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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"); -- cgit v1.1