diff options
author | Nate Jiang <qiangjiang@google.com> | 2020-09-16 11:39:35 -0700 |
---|---|---|
committer | Nate Jiang <qiangjiang@google.com> | 2020-09-16 21:08:41 +0000 |
commit | 8d45aeeb4d59b14a6bf25505d0de9a00bd4d2828 (patch) | |
tree | 36b0d4cecdccca0cf751f6127eefca78e73c2c25 /service | |
parent | 61c09c33d23d149d1703d53591ee5a84554fd565 (diff) |
[Suggestion] Make allowAutoJoin consist for suggestion
Bug: 168573596
Test: atest com.android.server.wifi
Change-Id: I2a4153afa8795baab7c62bc8cca7b985c5dec069
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/NetworkSuggestionNominator.java | 2 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigManager.java | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/NetworkSuggestionNominator.java b/service/java/com/android/server/wifi/NetworkSuggestionNominator.java index b174be5e0..8c901cff9 100644 --- a/service/java/com/android/server/wifi/NetworkSuggestionNominator.java +++ b/service/java/com/android/server/wifi/NetworkSuggestionNominator.java @@ -246,6 +246,7 @@ public class NetworkSuggestionNominator implements WifiNetworkSelector.NetworkNo mLocalLog.log("Failed to add network suggestion"); continue; } + mWifiConfigManager.allowAutojoin(result.getNetworkId(), config.allowAutojoin); WifiConfiguration currentWCmConfiguredNetwork = mWifiConfigManager.getConfiguredNetwork(result.netId); // Try to enable network selection @@ -276,6 +277,7 @@ public class NetworkSuggestionNominator implements WifiNetworkSelector.NetworkNo mLocalLog.log("Failed to add network suggestion"); return null; } + mWifiConfigManager.allowAutojoin(result.getNetworkId(), wifiConfiguration.allowAutojoin); if (!mWifiConfigManager.updateNetworkSelectionStatus(result.getNetworkId(), WifiConfiguration.NetworkSelectionStatus.DISABLED_NONE)) { mLocalLog.log("Failed to make network suggestion selectable"); diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index 45a5d90b9..83cabf756 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -1132,7 +1132,6 @@ public class WifiConfigManager { newInternalConfig.noInternetAccessExpected = externalConfig.noInternetAccessExpected; newInternalConfig.ephemeral = externalConfig.ephemeral; newInternalConfig.osu = externalConfig.osu; - newInternalConfig.trusted = externalConfig.trusted; newInternalConfig.fromWifiNetworkSuggestion = externalConfig.fromWifiNetworkSuggestion; newInternalConfig.fromWifiNetworkSpecifier = externalConfig.fromWifiNetworkSpecifier; newInternalConfig.useExternalScores = externalConfig.useExternalScores; |