summaryrefslogtreecommitdiffstats
path: root/service/java/com/android/server/wifi/WifiConfigManager.java
diff options
context:
space:
mode:
authorKevin F. Haggerty <haggertk@lineageos.org>2020-06-01 21:10:38 -0600
committerKevin F. Haggerty <haggertk@lineageos.org>2020-06-01 21:10:38 -0600
commitef8b1a63ba4a1a1d72d8d6354d8cdbf3e0e9540d (patch)
tree7dcde6f33951f4e22d91297f1ba6699dc4b2a8aa /service/java/com/android/server/wifi/WifiConfigManager.java
parenta28db699f2898e1f2ed695f6adccd47e1f654bf4 (diff)
parent522cdf0da0b7d09b7254a7cda53ff8b5efc7da27 (diff)
downloadandroid_frameworks_opt_net_wifi-ef8b1a63ba4a1a1d72d8d6354d8cdbf3e0e9540d.tar.gz
android_frameworks_opt_net_wifi-ef8b1a63ba4a1a1d72d8d6354d8cdbf3e0e9540d.tar.bz2
android_frameworks_opt_net_wifi-ef8b1a63ba4a1a1d72d8d6354d8cdbf3e0e9540d.zip
Merge tag 'android-10.0.0_r37' into staging/lineage-17.1_merge-android-10.0.0_r37lineage-17.1
Android 10.0.0 Release 37 (QQ3A.200605.001) * tag 'android-10.0.0_r37': Enterprise suggestion's catificate share same lifecycle as suggestion [Passpoint] Fix Passpoint matching algorithm for Home networks [WifiConfigManager] Log the disable reason when re-enabling. Fix removing enterprise suggestion certificate Enterprise suggestion's catificate share same lifecycle as suggestion Add EAP methods in WifiMetrics fix soft reboot caused by KeyStore exception fix soft reboot caused by KeyStore exception Change-Id: Icd34f29b28ee6c2d329259b14d1c4ecbd8ae5824
Diffstat (limited to 'service/java/com/android/server/wifi/WifiConfigManager.java')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigManager.java24
1 files changed, 15 insertions, 9 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java
index c617b9e1f..9472367fb 100644
--- a/service/java/com/android/server/wifi/WifiConfigManager.java
+++ b/service/java/com/android/server/wifi/WifiConfigManager.java
@@ -1230,12 +1230,11 @@ public class WifiConfigManager {
return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
}
- // Update the keys for non-Passpoint enterprise networks. For Passpoint, the certificates
- // and keys are installed at the time the provider is installed.
- if (config.enterpriseConfig != null
- && config.enterpriseConfig.getEapMethod() != WifiEnterpriseConfig.Eap.NONE
- && !config.isPasspoint()) {
- if (!(mWifiKeyStore.updateNetworkKeys(newInternalConfig, existingInternalConfig))) {
+ // Update the keys for saved enterprise networks. For Passpoint, the certificates
+ // and keys are installed at the time the provider is installed. For suggestion enterprise
+ // network the certificates and keys are installed at the time the suggestion is added
+ if (!config.isPasspoint() && !config.fromWifiNetworkSuggestion && config.isEnterprise()) {
+ if (!mWifiKeyStore.updateNetworkKeys(newInternalConfig, existingInternalConfig)) {
return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
}
}
@@ -1372,9 +1371,10 @@ public class WifiConfigManager {
if (mVerboseLoggingEnabled) {
Log.v(TAG, "Removing network " + config.getPrintableSsid());
}
- // Remove any associated enterprise keys for non-Passpoint networks.
- if (!config.isPasspoint() && config.enterpriseConfig != null
- && config.enterpriseConfig.getEapMethod() != WifiEnterpriseConfig.Eap.NONE) {
+ // Remove any associated enterprise keys for saved enterprise networks. Passpoint network
+ // will remove the enterprise keys when provider is uninstalled. Suggestion enterprise
+ // networks will remove the enterprise keys when suggestion is removed.
+ if (!config.isPasspoint() && !config.fromWifiNetworkSuggestion && config.isEnterprise()) {
mWifiKeyStore.removeKeys(config.enterpriseConfig);
}
@@ -1558,6 +1558,12 @@ public class WifiConfigManager {
*/
private void setNetworkSelectionEnabled(WifiConfiguration config) {
NetworkSelectionStatus status = config.getNetworkSelectionStatus();
+ if (status.getNetworkSelectionStatus()
+ != NetworkSelectionStatus.NETWORK_SELECTION_ENABLED) {
+ localLog("setNetworkSelectionEnabled: configKey=" + config.configKey()
+ + " old networkStatus=" + status.getNetworkStatusString()
+ + " disableReason=" + status.getNetworkDisableReasonString());
+ }
status.setNetworkSelectionStatus(
NetworkSelectionStatus.NETWORK_SELECTION_ENABLED);
status.setDisableTime(