summaryrefslogtreecommitdiffstats
path: root/service/java/com/android/server/wifi/WifiConfigStore.java
diff options
context:
space:
mode:
authorNalla Kartheek <karthe@codeaurora.org>2015-02-20 14:55:21 +0530
committerAragaoAnderson <andersonaragao@me.com>2015-04-11 21:30:22 -0300
commit2caaed6bb73020faad5f656844ae093aa40f7a56 (patch)
treefd8801590257c6018696c371264fb5d12a05ea11 /service/java/com/android/server/wifi/WifiConfigStore.java
parent1e45f2f13c0e5b5a1d595da0df0dc57bd1aca93f (diff)
downloadandroid_frameworks_opt_net_wifi-2caaed6bb73020faad5f656844ae093aa40f7a56.tar.gz
android_frameworks_opt_net_wifi-2caaed6bb73020faad5f656844ae093aa40f7a56.tar.bz2
android_frameworks_opt_net_wifi-2caaed6bb73020faad5f656844ae093aa40f7a56.zip
Wifi: Filter the scan results based on the configured band
Framework needs to get the scan results based on the configured band as the supplicant / host driver shall maintain the cache for these scan results. Without this, the UI shall display the scan results not corresponding to the configured band. This band capability also needs to be considered while getting the visibility of the network to trigger auto join. This commit ensures the same. Change-Id: Iccc9ab936895b3fb1028c2ad6a4fa12b7d4c7067 CRs-Fixed: 797374
Diffstat (limited to 'service/java/com/android/server/wifi/WifiConfigStore.java')
-rwxr-xr-xservice/java/com/android/server/wifi/WifiConfigStore.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java
index 5478d144b..b14226a2d 100755
--- a/service/java/com/android/server/wifi/WifiConfigStore.java
+++ b/service/java/com/android/server/wifi/WifiConfigStore.java
@@ -398,6 +398,8 @@ public class WifiConfigStore extends IpConfigStore {
public static final int maxNumScanCacheEntries = 128;
+ private int mConfiguredBand = 0;
+
/**
* Regex pattern for extracting a connect choice.
* Matches a strings like the following:
@@ -677,7 +679,7 @@ public class WifiConfigStore extends IpConfigStore {
}
// Calculate the RSSI for scan results that are more recent than milli
- config.setVisibility(milli);
+ config.setVisibility(milli, mConfiguredBand);
if (config.visibility == null) {
continue;
}
@@ -1904,6 +1906,10 @@ public class WifiConfigStore extends IpConfigStore {
return lastSelectedConfiguration;
}
+ public void setConfiguredBand(int band) {
+ mConfiguredBand = band;
+ }
+
public boolean isLastSelectedConfiguration(WifiConfiguration config) {
return (lastSelectedConfiguration != null
&& config != null