summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-11-22 06:02:18 +0000
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-11-26 12:32:17 +0000
commit0c04639099a004a609ea0c427e50022e8221b351 (patch)
treea68175b7c7405461a85e872a736ca63ca544fa92 /telephony
parent80092c5b449ff80a1eba9800220cf3ed60b30572 (diff)
downloadframeworks_base-0c04639099a004a609ea0c427e50022e8221b351.zip
frameworks_base-0c04639099a004a609ea0c427e50022e8221b351.tar.gz
frameworks_base-0c04639099a004a609ea0c427e50022e8221b351.tar.bz2
telephony: SignalStrengh: Don't calculate a LTE snr if the srq is invalid
If the previous values are invalid and signal quality is -1, chances are there's no LTE signal at all, so don't calculate the SNR and mark it invalid as well. This fixes the strength indicator in GSM devices where it was being skewed by the ghost LTE value Change-Id: I070573401c141aa99941a332ee256246697abb90
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/SignalStrength.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java
index f998935..3f9fc0a 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -342,7 +342,7 @@ public class SignalStrength implements Parcelable {
mLteSignalStrength = (mLteSignalStrength >= 0) ? mLteSignalStrength : 99;
mLteRsrp = ((mLteRsrp >= 44) && (mLteRsrp <= 140)) ? -mLteRsrp : SignalStrength.INVALID;
mLteRsrq = ((mLteRsrq >= 3) && (mLteRsrq <= 20)) ? -mLteRsrq : SignalStrength.INVALID;
- mLteRssnr = ((mLteRssnr >= -200) && (mLteRssnr <= 300)) ? mLteRssnr
+ mLteRssnr = ((mLteRssnr >= -200) && (mLteRssnr <= 300) && !(mLteRsrq == SignalStrength.INVALID && mLteRssnr == -1)) ? mLteRssnr
: SignalStrength.INVALID;
// Cqi no change
if (DBG) log("Signal after validate=" + this);