diff options
author | sanketk <sanketk@codeaurora.org> | 2015-08-03 05:39:35 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:20:30 -0600 |
commit | 0078bf366e11b47db2b5d27f5b8117bfbd95c681 (patch) | |
tree | 4d62a52fa555702611df052d08cb53b587d535c7 /service/java/com/android/server/wifi/WifiConfigStore.java | |
parent | 1a0319f2c6766a93090565d091ba13cf124f8590 (diff) | |
download | android_frameworks_opt_net_wifi-0078bf366e11b47db2b5d27f5b8117bfbd95c681.tar.gz android_frameworks_opt_net_wifi-0078bf366e11b47db2b5d27f5b8117bfbd95c681.tar.bz2 android_frameworks_opt_net_wifi-0078bf366e11b47db2b5d27f5b8117bfbd95c681.zip |
Wifi: Add Wqe support
Allow for BSSID-based blacklisting and unblacklisting intents
Change-Id: I5cab504472b591af69a44b023d3e51ba12466e8f
Diffstat (limited to 'service/java/com/android/server/wifi/WifiConfigStore.java')
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigStore.java | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java index 30f0e6c96..8107d1ac9 100644 --- a/service/java/com/android/server/wifi/WifiConfigStore.java +++ b/service/java/com/android/server/wifi/WifiConfigStore.java @@ -2323,7 +2323,7 @@ public class WifiConfigStore extends IpConfigStore { if (key.equals(CONFIG_KEY)) { config = mConfiguredNetworks.getByConfigKey(value); - + // skip reading that configuration data // since we don't have a corresponding network ID if (config == null) { @@ -4210,6 +4210,38 @@ public class WifiConfigStore extends IpConfigStore { return found; } + /** + * Handle blacklisting per BSSID and unblacklisting + * + * @param enable + * @param BSSID + * @param reason + */ + void handleDisabledAPs( boolean enable, String BSSID, int reason) { + if (BSSID == null) + return; + for (WifiConfiguration config : mConfiguredNetworks.values()) { + if (getScanDetailCache(config) != null) { + for (ScanDetail scanDetail : getScanDetailCache(config).values()) { + if (scanDetail.getBSSIDString().equals(BSSID)) { + if (enable) { + config.BSSID = "any"; + scanDetail.getScanResult().setAutoJoinStatus(ScanResult.ENABLED); + // enable auto join for the blacklisted BSSID + config.setAutoJoinStatus(WifiConfiguration.AUTO_JOIN_ENABLED); + } else { + // blacklist only the specified BSSID + scanDetail.getScanResult().setAutoJoinStatus(ScanResult.AUTO_ROAM_DISABLED); + config.BSSID = BSSID; + config.setAutoJoinStatus(WifiConfiguration.AUTO_JOIN_TEMPORARY_DISABLED); + } + } + } + } + } + } + + int getMaxDhcpRetries() { return Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT, |