summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorAmin Shaikh <ashaikh@google.com>2017-01-20 11:07:36 -0800
committerAmin Shaikh <ashaikh@google.com>2017-01-20 16:31:51 -0800
commit5eceb34aa6a940ac079fc336209e6fd981d30dd5 (patch)
tree2e26295921f03cc7736765ba43b7d1eb6e2ca44a /service
parent55066b337d76f6e8eb1b8b7aacbcd4b2b9024b9a (diff)
Populate selected network in RecommendationRequest
Bug: 34467596 Test: ./runtests.sh Change-Id: Ide0b4cbc9114bb8f79a2671103ab7f1cf0590dd0
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/RecommendedNetworkEvaluator.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/RecommendedNetworkEvaluator.java b/service/java/com/android/server/wifi/RecommendedNetworkEvaluator.java
index e8c1ad3b6..5b5b57e61 100644
--- a/service/java/com/android/server/wifi/RecommendedNetworkEvaluator.java
+++ b/service/java/com/android/server/wifi/RecommendedNetworkEvaluator.java
@@ -158,10 +158,13 @@ public class RecommendedNetworkEvaluator implements WifiNetworkSelector.NetworkE
ScanResult[] scanResultArray = scanResults.toArray(new ScanResult[scanResults.size()]);
WifiConfiguration[] availableConfigsArray = availableConfiguredNetworks
.toArray(new WifiConfiguration[availableConfiguredNetworks.size()]);
+ int lastSelectedNetworkId = mWifiConfigManager.getLastSelectedNetwork();
+ long lastSelectedNetworkTimestamp = mWifiConfigManager.getLastSelectedTimeStamp();
RecommendationRequest request = new RecommendationRequest.Builder()
.setScanResults(scanResultArray)
.setConnectedWifiConfig(currentNetwork)
.setConnectableConfigs(availableConfigsArray)
+ .setLastSelectedNetwork(lastSelectedNetworkId, lastSelectedNetworkTimestamp)
// TODO: pass in currently recommended network
.build();
RecommendationResult result = mNetworkScoreManager.requestRecommendation(request);