summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-05-06 20:29:42 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-05-06 20:29:42 +0000
commit3ee284a8275e91cc22baf987fee486f078f65768 (patch)
treeaafb004dc744ce3f4074778195f9ad3ece7cee57
parent80570186634cb5a79f7599aed46eeb3d04185c85 (diff)
parent903adb307231d9be59e898c7255d688e343ec3af (diff)
Merge "[WifiTrackerLib] Return SPEED_NONE if ScoredNetwork has no speed info" into rvc-dev
-rw-r--r--libs/WifiTrackerLib/src/com/android/wifitrackerlib/Utils.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/Utils.java b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/Utils.java
index 78617ba5a..934cdf146 100644
--- a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/Utils.java
+++ b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/Utils.java
@@ -347,7 +347,9 @@ class Utils {
@Speed
private static int roundToClosestSpeedEnum(int speed) {
- if (speed < (SPEED_SLOW + SPEED_MODERATE) / 2) {
+ if (speed == SPEED_NONE) {
+ return SPEED_NONE;
+ } else if (speed < (SPEED_SLOW + SPEED_MODERATE) / 2) {
return SPEED_SLOW;
} else if (speed < (SPEED_MODERATE + SPEED_FAST) / 2) {
return SPEED_MODERATE;