diff options
author | Roshan Pius <rpius@google.com> | 2018-04-16 11:06:27 -0700 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2018-04-19 10:32:38 -0700 |
commit | 86ea918f785f665e0fa41ddd5d6803d73ad72650 (patch) | |
tree | da048d41c1d353f29c2d0ac7f3ca6485bb4137bf /service | |
parent | d5faea1644d2360f5c776cb833f2123e1c082f35 (diff) |
WifiConnectivityManager: Add config flag for filtering DBS scans
OEM's may want to disable this filtering logic for their devices.
Bug: 78112990
Test: Unit tests
Test: Ensured DBS scans are still filtered when enabled.
Change-Id: Id3bf5b0f0be49c89341f87bac97f4e339d1eb27a
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiConnectivityManager.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/WifiConnectivityManager.java b/service/java/com/android/server/wifi/WifiConnectivityManager.java index 3b9d0ff21..aa4fd80df 100644 --- a/service/java/com/android/server/wifi/WifiConnectivityManager.java +++ b/service/java/com/android/server/wifi/WifiConnectivityManager.java @@ -164,6 +164,7 @@ public class WifiConnectivityManager { // Device configs private boolean mEnableAutoJoinWhenAssociated; private boolean mWaitForFullBandScanResults = false; + private boolean mUseSingleRadioChainScanResults = false; private int mFullScanMaxTxRate; private int mFullScanMaxRxRate; @@ -370,8 +371,10 @@ public class WifiConnectivityManager { } // When the scan result has radio chain info, ensure we throw away scan results - // not received with both radio chains. - if (ArrayUtils.size(fullScanResult.radioChainInfos) == 1) { + // not received with both radio chains (if |mUseSingleRadioChainScanResults| is false). + if (!mUseSingleRadioChainScanResults + && fullScanResult.radioChainInfos != null + && fullScanResult.radioChainInfos.length == 1) { // Keep track of the number of dropped scan results for logging. mNumScanResultsIgnoredDueToSingleRadioChain++; return; @@ -605,6 +608,8 @@ public class WifiConnectivityManager { R.integer.config_wifi_framework_SECURITY_AWARD); mEnableAutoJoinWhenAssociated = context.getResources().getBoolean( R.bool.config_wifi_framework_enable_associated_network_selection); + mUseSingleRadioChainScanResults = context.getResources().getBoolean( + R.bool.config_wifi_framework_use_single_radio_chain_scan_results_network_selection); mInitialScoreMax = (Math.max(mScoringParams.getGoodRssi(ScoringParams.BAND2), mScoringParams.getGoodRssi(ScoringParams.BAND5)) + context.getResources().getInteger( |