From 6fcc14c6109e17cd47d007e6dd677d3ce5616bdd Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 6 Aug 2018 20:01:44 +0200
Subject: [PATCH 14/27] Change SignalStrentgh to change behaviour based on
 property

Change-Id: I940ed724047567ec5195ac93ea04574c3d92f70b

Conflicts:
	telephony/java/android/telephony/SignalStrength.java
---
 .../android/telephony/SignalStrength.java     | 40 ++++++++++++-------
 1 file changed, 26 insertions(+), 14 deletions(-)

diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java
index 55c0c778972..ff906d330d4 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -854,6 +854,7 @@ public class SignalStrength implements Parcelable {
          * RSRQ = quality of signal dB = Number of Resource blocks*RSRP/RSSI
          * SNR = gain = signal/noise ratio = -10log P1/P2 dB
          */
+        String method = android.os.SystemProperties.get("persist.sys.signal.level", "default");
         int rssiIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN, rsrpIconLevel = -1, snrIconLevel = -1;
 
         if (mLteRsrp > MAX_LTE_RSRP || mLteRsrp < MIN_LTE_RSRP) {
@@ -897,8 +898,31 @@ public class SignalStrength implements Parcelable {
                 + rsrpIconLevel + " snrIconLevel:" + snrIconLevel
                 + " lteRsrpBoost:" + mLteRsrpBoost);
 
-	/* Ignore RSSNR for now */
-	if(rsrpIconLevel != -1) return rsrpIconLevel;
+        /* Valid values are (0-63, 99) as defined in TS 36.331 */
+        // TODO the range here is probably supposed to be (0..31, 99). It's unclear if anyone relies
+        // on the current incorrect range check, so this will be fixed in a future release with more
+        // soak time
+        if (mLteSignalStrength > 63) rssiIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+        else if (mLteSignalStrength >= 12) rssiIconLevel = SIGNAL_STRENGTH_GREAT;
+        else if (mLteSignalStrength >= 8) rssiIconLevel = SIGNAL_STRENGTH_GOOD;
+        else if (mLteSignalStrength >= 5) rssiIconLevel = SIGNAL_STRENGTH_MODERATE;
+        else if (mLteSignalStrength >= 0) rssiIconLevel = SIGNAL_STRENGTH_POOR;
+
+        if (DBG) log("getLTELevel - rssi:" + mLteSignalStrength + " rssiIconLevel:"
+                + rssiIconLevel);
+
+        if("rsrp".equals(method)) {
+            if(rsrpIconLevel == -1) rsrpIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+            return rsrpIconLevel;
+        }
+        if("rssnr".equals(method)) {
+            if(snrIconLevel == -1) snrIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+            return snrIconLevel;
+        }
+        if("rssi".equals(method)) {
+            if(rssiIconLevel == -1) rssiIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+            return rssiIconLevel;
+        }
 
         /* Choose a measurement type to use for notification */
         if (snrIconLevel != -1 && rsrpIconLevel != -1) {
@@ -914,18 +938,6 @@ public class SignalStrength implements Parcelable {
 
         if (rsrpIconLevel != -1) return rsrpIconLevel;
 
-        /* Valid values are (0-63, 99) as defined in TS 36.331 */
-        // TODO the range here is probably supposed to be (0..31, 99). It's unclear if anyone relies
-        // on the current incorrect range check, so this will be fixed in a future release with more
-        // soak time
-        if (mLteSignalStrength > 63) rssiIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
-        else if (mLteSignalStrength >= 12) rssiIconLevel = SIGNAL_STRENGTH_GREAT;
-        else if (mLteSignalStrength >= 8) rssiIconLevel = SIGNAL_STRENGTH_GOOD;
-        else if (mLteSignalStrength >= 5) rssiIconLevel = SIGNAL_STRENGTH_MODERATE;
-        else if (mLteSignalStrength >= 0) rssiIconLevel = SIGNAL_STRENGTH_POOR;
-
-        if (DBG) log("getLteLevel - rssi:" + mLteSignalStrength + " rssiIconLevel:"
-                + rssiIconLevel);
         return rssiIconLevel;
 
     }
-- 
2.17.1

