Merge "Change the threshold for RSSNR from 10*db to db"

This commit is contained in:
Shuo Qian
2020-06-16 21:26:10 +00:00
committed by Gerrit Code Review
2 changed files with 18 additions and 16 deletions

View File

@@ -2798,14 +2798,12 @@ public class CarrierConfigManager {
/** /**
* A list of 4 customized LTE Reference Signal Signal to Noise Ratio (RSSNR) thresholds. * 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: * 4 threshold integers must be within the boundaries [-20 dB, 30 dB], and the levels are:
* "NONE: [-200, threshold1)" * "NONE: [-20, threshold1)"
* "POOR: [threshold1, threshold2)" * "POOR: [threshold1, threshold2)"
* "MODERATE: [threshold2, threshold3)" * "MODERATE: [threshold2, threshold3)"
* "GOOD: [threshold3, threshold4)" * "GOOD: [threshold3, threshold4)"
* "EXCELLENT: [threshold4, 300]" * "EXCELLENT: [threshold4, 30]"
* Note: the unit of the values is 10*db; it is derived by multiplying 10 on the original dB
* value reported by modem.
* *
* This key is considered invalid if the format is violated. If the key is invalid or * This key is considered invalid if the format is violated. If the key is invalid or
* not configured, a default value set will apply. * not configured, a default value set will apply.
@@ -4143,10 +4141,10 @@ public class CarrierConfigManager {
}); });
sDefaults.putIntArray(KEY_LTE_RSSNR_THRESHOLDS_INT_ARRAY, sDefaults.putIntArray(KEY_LTE_RSSNR_THRESHOLDS_INT_ARRAY,
new int[] { new int[] {
-30, /* SIGNAL_STRENGTH_POOR */ -3, /* SIGNAL_STRENGTH_POOR */
10, /* SIGNAL_STRENGTH_MODERATE */ 1, /* SIGNAL_STRENGTH_MODERATE */
45, /* SIGNAL_STRENGTH_GOOD */ 5, /* SIGNAL_STRENGTH_GOOD */
130 /* SIGNAL_STRENGTH_GREAT */ 13 /* SIGNAL_STRENGTH_GREAT */
}); });
sDefaults.putIntArray(KEY_WCDMA_RSCP_THRESHOLDS_INT_ARRAY, sDefaults.putIntArray(KEY_WCDMA_RSCP_THRESHOLDS_INT_ARRAY,
new int[] { new int[] {

View File

@@ -118,7 +118,7 @@ public final class CellSignalStrengthLte extends CellSignalStrength implements P
* @param rssi in dBm [-113,-51], UNKNOWN * @param rssi in dBm [-113,-51], UNKNOWN
* @param rsrp in dBm [-140,-43], UNKNOWN * @param rsrp in dBm [-140,-43], UNKNOWN
* @param rsrq in dB [-34, 3], 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 cqi [0, 15], UNKNOWN
* @param timingAdvance [0, 1282], UNKNOWN * @param timingAdvance [0, 1282], UNKNOWN
* *
@@ -131,7 +131,7 @@ public final class CellSignalStrengthLte extends CellSignalStrength implements P
mSignalStrength = mRssi; mSignalStrength = mRssi;
mRsrp = inRangeOrUnavailable(rsrp, -140, -43); mRsrp = inRangeOrUnavailable(rsrp, -140, -43);
mRsrq = inRangeOrUnavailable(rsrq, -34, 3); mRsrq = inRangeOrUnavailable(rsrq, -34, 3);
mRssnr = inRangeOrUnavailable(rssnr, -200, 300); mRssnr = inRangeOrUnavailable(rssnr, -20, 30);
mCqi = inRangeOrUnavailable(cqi, 0, 15); mCqi = inRangeOrUnavailable(cqi, 0, 15);
mTimingAdvance = inRangeOrUnavailable(timingAdvance, 0, 1282); mTimingAdvance = inRangeOrUnavailable(timingAdvance, 0, 1282);
updateLevel(null, null); updateLevel(null, null);
@@ -143,7 +143,7 @@ public final class CellSignalStrengthLte extends CellSignalStrength implements P
this(convertRssiAsuToDBm(lte.signalStrength), this(convertRssiAsuToDBm(lte.signalStrength),
lte.rsrp != CellInfo.UNAVAILABLE ? -lte.rsrp : lte.rsrp, lte.rsrp != CellInfo.UNAVAILABLE ? -lte.rsrp : lte.rsrp,
lte.rsrq != CellInfo.UNAVAILABLE ? -lte.rsrq : lte.rsrq, lte.rsrq != CellInfo.UNAVAILABLE ? -lte.rsrq : lte.rsrq,
lte.rssnr, lte.cqi, lte.timingAdvance); convertRssnrUnitFromTenDbToDB(lte.rssnr), lte.cqi, lte.timingAdvance);
} }
/** @hide */ /** @hide */
@@ -208,10 +208,10 @@ public final class CellSignalStrengthLte extends CellSignalStrength implements P
}; };
// Lifted from Default carrier configs and max range of RSSNR // Lifted from Default carrier configs and max range of RSSNR
private static final int[] sRssnrThresholds = new int[] { private static final int[] sRssnrThresholds = new int[] {
-30, /* SIGNAL_STRENGTH_POOR */ -3, /* SIGNAL_STRENGTH_POOR */
10, /* SIGNAL_STRENGTH_MODERATE */ 1, /* SIGNAL_STRENGTH_MODERATE */
45, /* SIGNAL_STRENGTH_GOOD */ 5, /* SIGNAL_STRENGTH_GOOD */
130 /* SIGNAL_STRENGTH_GREAT */ 13 /* SIGNAL_STRENGTH_GREAT */
}; };
private static final int sRsrpBoost = 0; private static final int sRsrpBoost = 0;
@@ -556,6 +556,10 @@ public final class CellSignalStrengthLte extends CellSignalStrength implements P
Rlog.w(LOG_TAG, s); Rlog.w(LOG_TAG, s);
} }
private static int convertRssnrUnitFromTenDbToDB(int rssnr) {
return rssnr / 10;
}
private static int convertRssiAsuToDBm(int rssiAsu) { private static int convertRssiAsuToDBm(int rssiAsu) {
if (rssiAsu == SIGNAL_STRENGTH_LTE_RSSI_ASU_UNKNOWN) { if (rssiAsu == SIGNAL_STRENGTH_LTE_RSSI_ASU_UNKNOWN) {
return CellInfo.UNAVAILABLE; return CellInfo.UNAVAILABLE;