summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-05-06 21:02:54 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-05-06 21:02:54 +0000
commit07bc6e87ed4b4b127f40cc91b2ce712ccdfbc7fe (patch)
treeb0c811757e43f082324a3a3130bb24d516796363 /libs
parent42e14a123ca80cce3b6adda2b2fcc17bb90583ca (diff)
parent65fc81135c6ed806c584360346c841e7679daf75 (diff)
Merge "[WifiTrackerLib] Return SPEED_NONE if ScoredNetwork has no speed info" into rvc-dev am: 3ee284a827 am: 65fc81135c
Change-Id: I6da1a66a2e673d1b87c3bd59fa962038ec8e847f
Diffstat (limited to 'libs')
-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;