summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorNate Jiang <qiangjiang@google.com>2020-04-29 14:20:34 -0700
committerNate Jiang <qiangjiang@google.com>2020-04-29 14:22:25 -0700
commit07b8d667df82fa5ffda9cf7527cf910a25e00c8a (patch)
treec2c2f6128f40a4ffe2c2164d4e9562f5ad3dcd90 /service
parent9f756c8e97656f1edbb744de5b74a8ca693ae755 (diff)
Add overlay to control if ignore saved open network
Bug: 154654080 Test: atest com.android.server.wifi Change-Id: I0e41dc95c1b6a2e0e9a0ab79aacab7fa7a846154
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java4
-rw-r--r--service/res/values/config.xml2
-rw-r--r--service/res/values/overlayable.xml1
3 files changed, 7 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
index fc1b32d05..b83af52f2 100644
--- a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
+++ b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
@@ -2028,6 +2028,10 @@ public class WifiNetworkSuggestionsManager {
*/
public boolean shouldBeIgnoredBySecureSuggestionFromSameCarrier(
@NonNull WifiConfiguration configuration, List<ScanDetail> scanDetails) {
+ if (!mResources.getBoolean(
+ R.bool.config_wifiIgnoreOpenSavedNetworkWhenSecureSuggestionAvailable)) {
+ return false;
+ }
if (configuration == null || scanDetails == null || !configuration.isOpenNetwork()) {
return false;
}
diff --git a/service/res/values/config.xml b/service/res/values/config.xml
index c58ab196b..5d8a47ca9 100644
--- a/service/res/values/config.xml
+++ b/service/res/values/config.xml
@@ -412,4 +412,6 @@
cause the wifi stack to turn wifi off and wait for user input.
Set to 0 to turn off recovery attempts and always turn off wifi on failures -->
<integer translatable="false" name="config_wifiMaxNativeFailureSelfRecoveryPerHour">2</integer>
+ <!-- Ignore the open saved network if from carrier provisioning app, there is a same open suggestion and a secure suggestion from same carrier available -->
+ <bool translatable="false" name="config_wifiIgnoreOpenSavedNetworkWhenSecureSuggestionAvailable">true</bool>
</resources>
diff --git a/service/res/values/overlayable.xml b/service/res/values/overlayable.xml
index 687b6b9e8..60454728d 100644
--- a/service/res/values/overlayable.xml
+++ b/service/res/values/overlayable.xml
@@ -129,6 +129,7 @@
<item type="bool" name="config_wifiSaeUpgradeEnabled" />
<item type="bool" name="config_wifiSaeUpgradeOffloadEnabled" />
<item type="integer" name="config_wifiMaxNativeFailureSelfRecoveryPerHour" />
+ <item type="bool" name="config_wifiIgnoreOpenSavedNetworkWhenSecureSuggestionAvailable" />
<!-- Params from config.xml that can be overlayed -->
<!-- Params from strings.xml that can be overlayed -->