diff options
author | David Ferguson <ferguson.david@gmail.com> | 2013-02-07 11:46:15 -0500 |
---|---|---|
committer | David Ferguson <ferguson.david@gmail.com> | 2013-02-07 11:46:15 -0500 |
commit | bca85064a57eb20ace6dd073bbe627fcd02fe90d (patch) | |
tree | cc0d73684d64b217f449fbba8617b49486a27974 | |
parent | 785f7a25f03f3d32eb3a97694fd24c618734dd28 (diff) | |
download | frameworks_opt_telephony-bca85064a57eb20ace6dd073bbe627fcd02fe90d.zip frameworks_opt_telephony-bca85064a57eb20ace6dd073bbe627fcd02fe90d.tar.gz frameworks_opt_telephony-bca85064a57eb20ace6dd073bbe627fcd02fe90d.tar.bz2 |
Qualcomm LTE RILs: do not make mLteRsrp negative
* In CM10.1, SignalStrength::validateInput() was added. This function expects
mLteRsrp to be positive coming from the RIL.
* Inverting in the RIL was causing validateInput() to flag mLteRsrp as invalid.
* This shows up as a 0x7fffffff in About phone->Status->Signal strength when on LTE
* Let validateInput() invert the sign instead of doing it in the custom RILs
Change-Id: I6ae7e4a56141c49628576305d21bee77b2a93ad7
3 files changed, 7 insertions, 14 deletions
diff --git a/src/java/com/android/internal/telephony/LGEQualcommUiccRIL.java b/src/java/com/android/internal/telephony/LGEQualcommUiccRIL.java index d1bb24a..8d9b8c4 100644 --- a/src/java/com/android/internal/telephony/LGEQualcommUiccRIL.java +++ b/src/java/com/android/internal/telephony/LGEQualcommUiccRIL.java @@ -179,9 +179,6 @@ public class LGEQualcommUiccRIL extends QualcommSharedRIL implements CommandsInt response[i] = -1; noLte = true; } - if (i == 8 && !(noLte || oldRil)) { - response[i] *= -1; - } } return new SignalStrength(response[0], response[1], response[2], response[3], response[4], response[5], response[6], response[7],response[8], response[9], response[10], response[11], true); diff --git a/src/java/com/android/internal/telephony/QualcommSharedRIL.java b/src/java/com/android/internal/telephony/QualcommSharedRIL.java index 60aa757..16a912b 100644 --- a/src/java/com/android/internal/telephony/QualcommSharedRIL.java +++ b/src/java/com/android/internal/telephony/QualcommSharedRIL.java @@ -366,9 +366,6 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface { response[i] = -1; noLte = true; } - if (i == 8 && !(noLte || oldRil)) { - response[i] *= -1; - } } return new SignalStrength(response[0], response[1], response[2], response[3], response[4], response[5], response[6], response[7],response[8], response[9], response[10], response[11], true); } diff --git a/src/java/com/android/internal/telephony/SamsungQualcommUiccRIL.java b/src/java/com/android/internal/telephony/SamsungQualcommUiccRIL.java index 967f2d1..57007dd 100644 --- a/src/java/com/android/internal/telephony/SamsungQualcommUiccRIL.java +++ b/src/java/com/android/internal/telephony/SamsungQualcommUiccRIL.java @@ -293,17 +293,16 @@ public class SamsungQualcommUiccRIL extends QualcommSharedRIL implements Command // Translate number of bars into something SignalStrength.java can understand switch (num_bars) { - case 0 : response[8] = -1; break; // map to 0 bars - case 1 : response[8] = -116; break; // map to 1 bar - case 2 : response[8] = -115; break; // map to 2 bars - case 3 : response[8] = -105; break; // map to 3 bars - case 4 : response[8] = -95; break; // map to 4 bars - case 5 : response[8] = -85; break; // map to 4 bars but give an extra 10 dBm - default : response[8] *= -1; break; // no idea; just pass value through + case 0 : response[8] = 1; break; // map to 0 bars + case 1 : response[8] = 116; break; // map to 1 bar + case 2 : response[8] = 115; break; // map to 2 bars + case 3 : response[8] = 105; break; // map to 3 bars + case 4 : response[8] = 95; break; // map to 4 bars + case 5 : response[8] = 85; break; // map to 4 bars but give an extra 10 dBm + default : break; // no idea; just pass value through } } else { response[7] &= 0xff; // remove the Samsung number of bars field - response[8] *= -1; } Log.d(LOG_TAG, "responseSignalStength AFTER: mode=" + (mSignalbarCount ? "bars" : "raw") + |