diff options
author | Randy Pan <zpan@google.com> | 2017-05-31 11:17:53 -0700 |
---|---|---|
committer | Randy Pan <zpan@google.com> | 2017-05-31 15:17:29 -0700 |
commit | 32a2c670100b84fb049f55ad5a8a300c60a48aa5 (patch) | |
tree | ab7b7c24cd262960f5c20d1cb9431d9641ea81a8 /service | |
parent | ab73d041b30848ba20e69244418fbfa9b4975383 (diff) |
SavedNetworkEvaluator: ignore ephemeral networks
Ephemeral networks should be evaluted by ScoredNetworkEvaluator.
Otherwise, an ephemeral network might be chosen over a saved
network. Plus, the SaveNetworkEvaluator's scoring algorithm
is different from the ScoredNetworkEvalutor, so the result
coming out from these two evalutors can be very different.
Bug: 62197617
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I3237b4ca50dd6964dd8678011e6a9940c0ca1d0b
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/SavedNetworkEvaluator.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/service/java/com/android/server/wifi/SavedNetworkEvaluator.java b/service/java/com/android/server/wifi/SavedNetworkEvaluator.java index bf79edaf8..720afd5a7 100644 --- a/service/java/com/android/server/wifi/SavedNetworkEvaluator.java +++ b/service/java/com/android/server/wifi/SavedNetworkEvaluator.java @@ -264,11 +264,12 @@ public class SavedNetworkEvaluator implements WifiNetworkSelector.NetworkEvaluat for (WifiConfiguration network : associatedConfigurations) { /** - * Ignore Passpoint networks. Passpoint networks are also considered as "saved" - * network, but without being persisted to the storage. They are being evaluated - * by {@link PasspointNetworkEvaluator}. + * Ignore Passpoint and Ephemeral networks. They are configured networks, + * but without being persisted to the storage. They are evaluated by + * {@link PasspointNetworkEvaluator} and {@link ScoredNetworkEvaluator} + * respectively. */ - if (network.isPasspoint()) { + if (network.isPasspoint() || network.isEphemeral()) { continue; } |