summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-06-18 08:26:14 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2013-06-18 08:26:14 -0700
commit2d29503e883845cc053cf4f3d8c634720e9bf8b2 (patch)
tree57f4f174f24392a2fff29b32a5a7e324ae5a8ee9
parentc4cfa945d217e7f9090b17abb467333bfd8ba168 (diff)
parent0c5a4d9a55c6413f8762fc4538c748d5d5851fb7 (diff)
downloadframeworks_opt_telephony-2d29503e883845cc053cf4f3d8c634720e9bf8b2.zip
frameworks_opt_telephony-2d29503e883845cc053cf4f3d8c634720e9bf8b2.tar.gz
frameworks_opt_telephony-2d29503e883845cc053cf4f3d8c634720e9bf8b2.tar.bz2
Merge "HTCQualcommRIL: optionally ignore IccCard states greater than 2" into cm-10.1
-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 7e6eff5..fa3a218 100644
--- a/src/java/com/android/internal/telephony/HTCQualcommRIL.java
+++ b/src/java/com/android/internal/telephony/HTCQualcommRIL.java
@@ -50,7 +50,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");