diff options
-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"); |