diff options
author | Peter Qiu <zqiu@google.com> | 2017-03-10 13:50:46 -0800 |
---|---|---|
committer | Peter Qiu <zqiu@google.com> | 2017-03-16 11:10:31 -0700 |
commit | 018e39e2f6201519373e7f4dbb1427f0e5274898 (patch) | |
tree | 2ba70f8261dfd9e3a8a0fa00f16b941de9036011 /service | |
parent | 48c93da3c53650a62bc827199840137417c0825a (diff) |
WifiConfigMangaer: use updated legacy Passpoint config indicator
Bug: 36101691
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I85cd5619072ec978913df932c0b47ebe696074bc
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigManager.java | 12 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigStoreLegacy.java | 1 |
2 files changed, 5 insertions, 8 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index 7c8cddae8..48dfc2fd1 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -34,7 +34,6 @@ import android.net.wifi.WifiEnterpriseConfig; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.net.wifi.WifiScanner; -import android.os.Process; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; @@ -2666,17 +2665,14 @@ public class WifiConfigManager { // List of network IDs for legacy Passpoint configuration to be removed. List<Integer> legacyPasspointNetId = new ArrayList<>(); for (WifiConfiguration config : mConfiguredNetworks.valuesForAllUsers()) { - // Ignore ephemeral and temporary Passpoint networks. Temporary Passpoint networks - // are created by {@link PasspointNetworkEvaluator} using WIFI_UID. - if (config.ephemeral || (config.isPasspoint() - && config.creatorUid == Process.WIFI_UID)) { + // Ignore ephemeral networks and non-legacy Passpoint configurations. + if (config.ephemeral || (config.isPasspoint() && !config.isLegacyPasspointConfig)) { continue; } - // Legacy Passpoint configuration represented by WifiConfiguration is created by an - // actual user, so migrate the configurations owned by the current user to + // Migrate the legacy Passpoint configurations owned by the current user to // {@link PasspointManager}. - if (config.isPasspoint() && WifiConfigurationUtil.doesUidBelongToAnyProfile( + if (config.isLegacyPasspointConfig && WifiConfigurationUtil.doesUidBelongToAnyProfile( config.creatorUid, mUserManager.getProfiles(mCurrentUserId))) { legacyPasspointNetId.add(config.networkId); // Migrate the legacy Passpoint configuration and add it to PasspointManager. diff --git a/service/java/com/android/server/wifi/WifiConfigStoreLegacy.java b/service/java/com/android/server/wifi/WifiConfigStoreLegacy.java index e7a7335d7..42a91de67 100644 --- a/service/java/com/android/server/wifi/WifiConfigStoreLegacy.java +++ b/service/java/com/android/server/wifi/WifiConfigStoreLegacy.java @@ -226,6 +226,7 @@ public class WifiConfigStoreLegacy { // Update the missing Passpoint configuration fields to this WifiConfiguration. LegacyPasspointConfig passpointConfig = passpointConfigMap.get(fqdn); + wifiConfig.isLegacyPasspointConfig = true; wifiConfig.FQDN = fqdn; wifiConfig.providerFriendlyName = passpointConfig.mFriendlyName; if (passpointConfig.mRoamingConsortiumOis != null) { |