From af14d7c242500906c8bd36a55e28cb924153f175 Mon Sep 17 00:00:00 2001 From: Yang Cao Date: Fri, 17 Dec 2021 10:26:32 +0800 Subject: Fix signal threshold boundaries for NR Aligns the threshold boundaries of 5G NR signals with LTE Test: manual Test: auto - atest FrameworksTelephonyTests:CellSignalStrengthNrTest atest FrameworksTelephonyTests:SignalStrengthTest atest FrameworksTelephonyTests:SignalStrengthControllerTest Bug: 214413103 Change-Id: I5d9c81b04f404120f5d9e42109822945bc2919e3 --- .../android/telephony/CarrierConfigManager.java | 30 +++++++++++----------- .../android/telephony/CellSignalStrengthNr.java | 8 +++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index ee646d9c9bdb..ae142c59b416 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -2846,11 +2846,11 @@ public class CarrierConfigManager { *

* 4 threshold integers must be within the boundaries [-140 dB, -44 dB], and the levels are: *

*

* This key is considered invalid if the format is violated. If the key is invalid or @@ -2866,11 +2866,11 @@ public class CarrierConfigManager { *

* 4 threshold integers must be within the boundaries [-43 dB, 20 dB], and the levels are: *

*

* This key is considered invalid if the format is violated. If the key is invalid or @@ -2887,11 +2887,11 @@ public class CarrierConfigManager { *

* 4 threshold integers must be within the boundaries [-23 dB, 40 dB], and the levels are: *

*

* This key is considered invalid if the format is violated. If the key is invalid or diff --git a/telephony/java/android/telephony/CellSignalStrengthNr.java b/telephony/java/android/telephony/CellSignalStrengthNr.java index cd22abddd3a7..417fd4904599 100644 --- a/telephony/java/android/telephony/CellSignalStrengthNr.java +++ b/telephony/java/android/telephony/CellSignalStrengthNr.java @@ -438,13 +438,13 @@ public final class CellSignalStrengthNr extends CellSignalStrength implements Pa int level; if (measure == CellInfo.UNAVAILABLE) { level = SIGNAL_STRENGTH_NONE_OR_UNKNOWN; - } else if (measure > thresholds[3]) { + } else if (measure >= thresholds[3]) { level = SIGNAL_STRENGTH_GREAT; - } else if (measure > thresholds[2]) { + } else if (measure >= thresholds[2]) { level = SIGNAL_STRENGTH_GOOD; - } else if (measure > thresholds[1]) { + } else if (measure >= thresholds[1]) { level = SIGNAL_STRENGTH_MODERATE; - } else if (measure > thresholds[0]) { + } else if (measure >= thresholds[0]) { level = SIGNAL_STRENGTH_POOR; } else { level = SIGNAL_STRENGTH_NONE_OR_UNKNOWN; -- cgit v1.2.3-59-g8ed1b