diff options
| author | 2020-06-16 21:26:10 +0000 | |
|---|---|---|
| committer | 2020-06-16 21:26:10 +0000 | |
| commit | 44550140282bb98a560fb02d10bc9569a081102c (patch) | |
| tree | 24735f923919b7d65e2e96a7c07a04197a46c65f | |
| parent | 5218a1f9e5d9285f7a93a6a37f8db93a01eaa2f8 (diff) | |
| parent | 3950d0a6317432251a89e7a6d6c4ccd1375a4912 (diff) | |
Merge "Change the threshold for RSSNR from 10*db to db"
| -rw-r--r-- | telephony/java/android/telephony/CarrierConfigManager.java | 16 | ||||
| -rw-r--r-- | telephony/java/android/telephony/CellSignalStrengthLte.java | 18 |
2 files changed, 18 insertions, 16 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 7f45ef4a2eca..c9ee2a1279bc 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -2798,14 +2798,12 @@ public class CarrierConfigManager { /** * A list of 4 customized LTE Reference Signal Signal to Noise Ratio (RSSNR) thresholds. * - * 4 threshold integers must be within the boundaries [-200, 300], and the levels are: - * "NONE: [-200, threshold1)" + * 4 threshold integers must be within the boundaries [-20 dB, 30 dB], and the levels are: + * "NONE: [-20, threshold1)" * "POOR: [threshold1, threshold2)" * "MODERATE: [threshold2, threshold3)" * "GOOD: [threshold3, threshold4)" - * "EXCELLENT: [threshold4, 300]" - * Note: the unit of the values is 10*db; it is derived by multiplying 10 on the original dB - * value reported by modem. + * "EXCELLENT: [threshold4, 30]" * * This key is considered invalid if the format is violated. If the key is invalid or * not configured, a default value set will apply. @@ -4143,10 +4141,10 @@ public class CarrierConfigManager { }); sDefaults.putIntArray(KEY_LTE_RSSNR_THRESHOLDS_INT_ARRAY, new int[] { - -30, /* SIGNAL_STRENGTH_POOR */ - 10, /* SIGNAL_STRENGTH_MODERATE */ - 45, /* SIGNAL_STRENGTH_GOOD */ - 130 /* SIGNAL_STRENGTH_GREAT */ + -3, /* SIGNAL_STRENGTH_POOR */ + 1, /* SIGNAL_STRENGTH_MODERATE */ + 5, /* SIGNAL_STRENGTH_GOOD */ + 13 /* SIGNAL_STRENGTH_GREAT */ }); sDefaults.putIntArray(KEY_WCDMA_RSCP_THRESHOLDS_INT_ARRAY, new int[] { diff --git a/telephony/java/android/telephony/CellSignalStrengthLte.java b/telephony/java/android/telephony/CellSignalStrengthLte.java index 2529387b19b3..c26936e4bdd0 100644 --- a/telephony/java/android/telephony/CellSignalStrengthLte.java +++ b/telephony/java/android/telephony/CellSignalStrengthLte.java @@ -118,7 +118,7 @@ public final class CellSignalStrengthLte extends CellSignalStrength implements P * @param rssi in dBm [-113,-51], UNKNOWN * @param rsrp in dBm [-140,-43], UNKNOWN * @param rsrq in dB [-34, 3], UNKNOWN - * @param rssnr in 10*dB [-200, +300], UNKNOWN + * @param rssnr in dB [-20, +30], UNKNOWN * @param cqi [0, 15], UNKNOWN * @param timingAdvance [0, 1282], UNKNOWN * @@ -131,7 +131,7 @@ public final class CellSignalStrengthLte extends CellSignalStrength implements P mSignalStrength = mRssi; mRsrp = inRangeOrUnavailable(rsrp, -140, -43); mRsrq = inRangeOrUnavailable(rsrq, -34, 3); - mRssnr = inRangeOrUnavailable(rssnr, -200, 300); + mRssnr = inRangeOrUnavailable(rssnr, -20, 30); mCqi = inRangeOrUnavailable(cqi, 0, 15); mTimingAdvance = inRangeOrUnavailable(timingAdvance, 0, 1282); updateLevel(null, null); @@ -143,7 +143,7 @@ public final class CellSignalStrengthLte extends CellSignalStrength implements P this(convertRssiAsuToDBm(lte.signalStrength), lte.rsrp != CellInfo.UNAVAILABLE ? -lte.rsrp : lte.rsrp, lte.rsrq != CellInfo.UNAVAILABLE ? -lte.rsrq : lte.rsrq, - lte.rssnr, lte.cqi, lte.timingAdvance); + convertRssnrUnitFromTenDbToDB(lte.rssnr), lte.cqi, lte.timingAdvance); } /** @hide */ @@ -208,10 +208,10 @@ public final class CellSignalStrengthLte extends CellSignalStrength implements P }; // Lifted from Default carrier configs and max range of RSSNR private static final int[] sRssnrThresholds = new int[] { - -30, /* SIGNAL_STRENGTH_POOR */ - 10, /* SIGNAL_STRENGTH_MODERATE */ - 45, /* SIGNAL_STRENGTH_GOOD */ - 130 /* SIGNAL_STRENGTH_GREAT */ + -3, /* SIGNAL_STRENGTH_POOR */ + 1, /* SIGNAL_STRENGTH_MODERATE */ + 5, /* SIGNAL_STRENGTH_GOOD */ + 13 /* SIGNAL_STRENGTH_GREAT */ }; private static final int sRsrpBoost = 0; @@ -556,6 +556,10 @@ public final class CellSignalStrengthLte extends CellSignalStrength implements P Rlog.w(LOG_TAG, s); } + private static int convertRssnrUnitFromTenDbToDB(int rssnr) { + return rssnr / 10; + } + private static int convertRssiAsuToDBm(int rssiAsu) { if (rssiAsu == SIGNAL_STRENGTH_LTE_RSSI_ASU_UNKNOWN) { return CellInfo.UNAVAILABLE; |