summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sooraj Sasindran <sasindran@google.com> 2022-04-18 17:22:03 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-04-18 17:22:03 +0000
commit865dcdbfb0fd09e1098d3a61b9708ca3c2b4d963 (patch)
tree08101bf1f24d2b0e6b14e8b1c79fac0577fd2afa
parentf92fa673daa1153649d5bf4edb71170d413e2767 (diff)
parentaf14d7c242500906c8bd36a55e28cb924153f175 (diff)
Merge "Fix signal threshold boundaries for NR"
-rw-r--r--telephony/java/android/telephony/CarrierConfigManager.java30
-rw-r--r--telephony/java/android/telephony/CellSignalStrengthNr.java8
2 files changed, 19 insertions, 19 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 83c78cd0236c..0d0142c330ce 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -2853,11 +2853,11 @@ public class CarrierConfigManager {
* <p>
* 4 threshold integers must be within the boundaries [-140 dB, -44 dB], and the levels are:
* <UL>
- * <LI>"NONE: [-140, threshold1]"</LI>
- * <LI>"POOR: (threshold1, threshold2]"</LI>
- * <LI>"MODERATE: (threshold2, threshold3]"</LI>
- * <LI>"GOOD: (threshold3, threshold4]"</LI>
- * <LI>"EXCELLENT: (threshold4, -44]"</LI>
+ * <LI>"NONE: [-140, threshold1)"</LI>
+ * <LI>"POOR: [threshold1, threshold2)"</LI>
+ * <LI>"MODERATE: [threshold2, threshold3)"</LI>
+ * <LI>"GOOD: [threshold3, threshold4)"</LI>
+ * <LI>"EXCELLENT: [threshold4, -44]"</LI>
* </UL>
* <p>
* This key is considered invalid if the format is violated. If the key is invalid or
@@ -2873,11 +2873,11 @@ public class CarrierConfigManager {
* <p>
* 4 threshold integers must be within the boundaries [-43 dB, 20 dB], and the levels are:
* <UL>
- * <LI>"NONE: [-43, threshold1]"</LI>
- * <LI>"POOR: (threshold1, threshold2]"</LI>
- * <LI>"MODERATE: (threshold2, threshold3]"</LI>
- * <LI>"GOOD: (threshold3, threshold4]"</LI>
- * <LI>"EXCELLENT: (threshold4, 20]"</LI>
+ * <LI>"NONE: [-43, threshold1)"</LI>
+ * <LI>"POOR: [threshold1, threshold2)"</LI>
+ * <LI>"MODERATE: [threshold2, threshold3)"</LI>
+ * <LI>"GOOD: [threshold3, threshold4)"</LI>
+ * <LI>"EXCELLENT: [threshold4, 20]"</LI>
* </UL>
* <p>
* This key is considered invalid if the format is violated. If the key is invalid or
@@ -2894,11 +2894,11 @@ public class CarrierConfigManager {
* <p>
* 4 threshold integers must be within the boundaries [-23 dB, 40 dB], and the levels are:
* <UL>
- * <LI>"NONE: [-23, threshold1]"</LI>
- * <LI>"POOR: (threshold1, threshold2]"</LI>
- * <LI>"MODERATE: (threshold2, threshold3]"</LI>
- * <LI>"GOOD: (threshold3, threshold4]"</LI>
- * <LI>"EXCELLENT: (threshold4, 40]"</LI>
+ * <LI>"NONE: [-23, threshold1)"</LI>
+ * <LI>"POOR: [threshold1, threshold2)"</LI>
+ * <LI>"MODERATE: [threshold2, threshold3)"</LI>
+ * <LI>"GOOD: [threshold3, threshold4)"</LI>
+ * <LI>"EXCELLENT: [threshold4, 40]"</LI>
* </UL>
* <p>
* 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;