summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorPeter Qiu <zqiu@google.com>2017-02-01 14:07:26 -0800
committerPeter Qiu <zqiu@google.com>2017-02-01 16:21:21 -0800
commitd7e8058288bdc5085b54fef77dbfa38597cea348 (patch)
treef90108d38413d31df059e92cecca526fb6d19484 /service
parentf8759c3c7309d4905459c04e476f720045f56304 (diff)
WifiConfigManager: do not delete certificates and keys for passpoint network
They will be deleted when the Passpoint profile is uninstalled. While there, avoid triggering a perisistent store save when adding or removing a WifiConfiguration for a Passpoint network. Bug: 34888235 Test: Verify connecting to a Passpoint network works after is disconnected previously Change-Id: I204eaf7053d047b5f4983c6167e6e520bcf643ff
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigManager.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java
index 7d8893e0f..eb25711cf 100644
--- a/service/java/com/android/server/wifi/WifiConfigManager.java
+++ b/service/java/com/android/server/wifi/WifiConfigManager.java
@@ -1002,8 +1002,8 @@ public class WifiConfigManager {
result.isNewNetwork()
? WifiManager.CHANGE_REASON_ADDED
: WifiManager.CHANGE_REASON_CONFIG_CHANGE);
- // Unless the added network is ephemeral, persist the network update/addition.
- if (!config.ephemeral) {
+ // Unless the added network is ephemeral or Passpoint, persist the network update/addition.
+ if (!config.ephemeral && !config.isPasspoint()) {
saveToStore(true);
}
return result;
@@ -1019,8 +1019,8 @@ public class WifiConfigManager {
if (mVerboseLoggingEnabled) {
Log.v(TAG, "Removing network " + config.getPrintableSsid());
}
- // Remove any associated enterprise keys.
- if (config.enterpriseConfig != null
+ // Remove any associated enterprise keys for non-Passpoint networks.
+ if (!config.isPasspoint() && config.enterpriseConfig != null
&& config.enterpriseConfig.getEapMethod() != WifiEnterpriseConfig.Eap.NONE) {
mWifiKeyStore.removeKeys(config.enterpriseConfig);
}
@@ -1066,8 +1066,8 @@ public class WifiConfigManager {
clearLastSelectedNetwork();
}
sendConfiguredNetworkChangedBroadcast(config, WifiManager.CHANGE_REASON_REMOVED);
- // Unless the removed network is ephemeral, persist the network removal.
- if (!config.ephemeral) {
+ // Unless the removed network is ephemeral or Passpoint, persist the network removal.
+ if (!config.ephemeral && !config.isPasspoint()) {
saveToStore(true);
}
return true;