summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Chen <intervigil@gmail.com>2013-05-16 15:03:59 -0700
committerEthan Chen <intervigil@gmail.com>2013-05-16 17:05:21 -0700
commite17912c8bd5528c395325a165a0c46cf005d8577 (patch)
tree2663033484479cb6dfe1920830915117683ded09
parent492c36536d259d55ea947a03ff22ad05ae6f51b2 (diff)
downloadframeworks_opt_telephony-e17912c8bd5528c395325a165a0c46cf005d8577.zip
frameworks_opt_telephony-e17912c8bd5528c395325a165a0c46cf005d8577.tar.gz
frameworks_opt_telephony-e17912c8bd5528c395325a165a0c46cf005d8577.tar.bz2
HTCQualcommRIL: adaptable signal strength format
HTC signal strength format has 14 fields, stock libril has 12 Change-Id: I8f42a9864dcd5f3071663d16535423e5cc12afbd
-rw-r--r--src/java/com/android/internal/telephony/HTCQualcommRIL.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/java/com/android/internal/telephony/HTCQualcommRIL.java b/src/java/com/android/internal/telephony/HTCQualcommRIL.java
index 0276a34..81f4d16 100644
--- a/src/java/com/android/internal/telephony/HTCQualcommRIL.java
+++ b/src/java/com/android/internal/telephony/HTCQualcommRIL.java
@@ -147,6 +147,8 @@ public class HTCQualcommRIL extends QualcommSharedRIL implements CommandsInterfa
* 13: LTE_SignalStrength.cqi
*/
+ int parcelSize = p.dataSize();
+
int gsmSignalStrength = p.readInt();
int gsmBitErrorRate = p.readInt();
int cdmaDbm = p.readInt();
@@ -154,8 +156,11 @@ public class HTCQualcommRIL extends QualcommSharedRIL implements CommandsInterfa
int evdoDbm = p.readInt();
int evdoEcio = p.readInt();
int evdoSnr = p.readInt();
- p.readInt(); // ATT_SignalStrength.dbm
- p.readInt(); // ATT_SignalStrength.ecno
+ if (parcelSize == 14) {
+ /* Signal strength parcel contains HTC ATT signal strength */
+ p.readInt(); // ATT_SignalStrength.dbm
+ p.readInt(); // ATT_SignalStrength.ecno
+ }
int lteSignalStrength = p.readInt();
int lteRsrp = p.readInt();
int lteRsrq = p.readInt();