summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-05-06 20:46:49 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-05-06 20:46:49 +0000
commit65fc81135c6ed806c584360346c841e7679daf75 (patch)
treec58d4ca6e3ab79e8c9e1595b4115f8f1eef09b60 /libs
parentd5e95ddf67b90f8151398fcb8beed32c8a6693f6 (diff)
parent3ee284a8275e91cc22baf987fee486f078f65768 (diff)
Merge "[WifiTrackerLib] Return SPEED_NONE if ScoredNetwork has no speed info" into rvc-dev am: 3ee284a827
Change-Id: Iac9c92810399898c621891505fbe5aad5ddc47c6
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;