diff options
author | Samuel Tan <samueltan@google.com> | 2016-04-12 15:46:56 -0700 |
---|---|---|
committer | Samuel Tan <samueltan@google.com> | 2016-04-12 15:46:56 -0700 |
commit | 913bb9047c0eab77653b47a0ed69dbe0bd3d479f (patch) | |
tree | 4757011f8acc0551e09ff506d4ef804571125985 /service | |
parent | fdbf9d334419ff5aff35bf56f7cf46d01998861b (diff) |
Remove WifiConfigManager.mDeletedSSIDs
mDeletedSSIDs are introduced in WifiConfigStore in
go/ag/585797, where it was used in
WifiConfigStore.associateWithConfiguration(). This method
was later removed in go/pag/215262, but mDeletedSSIDs
was not. Later, mDeletedSSIDs was moved to WifiConfigManager
in a WifiConfigStore refactor.
Since this variable is no longer used, delete it and all
references to it.
BUG: 28088479
Change-Id: I056ae6f6654269100fc96f25b299a9fece85be93
TEST: 'runtest frameworks-wifi' passes.
Diffstat (limited to 'service')
3 files changed, 0 insertions, 50 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index 3c8d219af..49205e8ec 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -298,12 +298,6 @@ public class WifiConfigManager { /* Stores a map of NetworkId to ScanCache */ private ConcurrentHashMap<Integer, ScanDetailCache> mScanDetailCaches; - /** - * Framework keeps a list of (the CRC32 hashes of) all SSIDs that where deleted by user, - * so as, framework knows not to re-add those SSIDs automatically to the Saved networks - */ - private Set<Long> mDeletedSSIDs = new HashSet<Long>(); - /* Tracks the highest priority of configured networks */ private int mLastPriority = -1; @@ -1265,24 +1259,6 @@ public class WifiConfigManager { if (sVDBG) { logd("removeNetwork " + " key=" + key + " config.id=" + config.networkId); } - if (config.selfAdded || config.linkedConfigurations != null - || config.allowedKeyManagement.get(KeyMgmt.WPA_PSK)) { - if (!TextUtils.isEmpty(config.SSID)) { - /* Remember that we deleted this PSK SSID */ - if (config.SSID != null) { - Long csum = getChecksum(config.SSID); - mDeletedSSIDs.add(csum); - logd("removeNetwork " - + " key=" + key - + " config.id=" + config.networkId - + " crc=" + csum); - } else { - logd("removeNetwork " - + " key=" + key - + " config.id=" + config.networkId); - } - } - } writeIpAndProxyConfigurations(); sendConfiguredNetworksChangedBroadcast(config, WifiManager.CHANGE_REASON_REMOVED); if (!config.ephemeral) { @@ -1919,7 +1895,6 @@ public class WifiConfigManager { private void readNetworkHistory(Map<String, WifiConfiguration> configs) { mWifiNetworkHistory.readNetworkHistory(configs, mScanDetailCaches, - mDeletedSSIDs, mDeletedEphemeralSSIDs); } @@ -1933,7 +1908,6 @@ public class WifiConfigManager { } mWifiNetworkHistory.writeKnownNetworkHistory(networks, mScanDetailCaches, - mDeletedSSIDs, mDeletedEphemeralSSIDs); } diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java index d50ddfe47..98d41f8fe 100644 --- a/service/java/com/android/server/wifi/WifiConfigStore.java +++ b/service/java/com/android/server/wifi/WifiConfigStore.java @@ -62,8 +62,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.zip.CRC32; -import java.util.zip.Checksum; /** * This class provides the API's to save/load/modify network configurations from a persistent @@ -483,15 +481,6 @@ public class WifiConfigStore { } networkExtras.put(config.networkId, extras); - Checksum csum = new CRC32(); - if (config.SSID != null) { - csum.update(config.SSID.getBytes(), 0, config.SSID.getBytes().length); - long d = csum.getValue(); - /* TODO(rpius) - if (mDeletedSSIDs.contains(d)) { - loge(" got CRC for SSID " + config.SSID + " -> " + d + ", was deleted"); - } */ - } if (config.priority > lastPriority) { lastPriority = config.priority; } diff --git a/service/java/com/android/server/wifi/WifiNetworkHistory.java b/service/java/com/android/server/wifi/WifiNetworkHistory.java index 039319618..ab2c22899 100644 --- a/service/java/com/android/server/wifi/WifiNetworkHistory.java +++ b/service/java/com/android/server/wifi/WifiNetworkHistory.java @@ -90,7 +90,6 @@ public class WifiNetworkHistory { private static final String EPHEMERAL_KEY = "EPHEMERAL"; private static final String METERED_HINT_KEY = "METERED_HINT"; private static final String NUM_ASSOCIATION_KEY = "NUM_ASSOCIATION"; - private static final String DELETED_CRC32_KEY = "DELETED_CRC32"; private static final String DELETED_EPHEMERAL_KEY = "DELETED_EPHEMERAL"; private static final String CREATOR_NAME_KEY = "CREATOR_NAME"; private static final String UPDATE_NAME_KEY = "UPDATE_NAME"; @@ -128,7 +127,6 @@ public class WifiNetworkHistory { */ public void writeKnownNetworkHistory(final List<WifiConfiguration> networks, final ConcurrentHashMap<Integer, ScanDetailCache> scanDetailCaches, - final Set<Long> deletedSSIDs, final Set<String> deletedEphemeralSSIDs) { /* Make a copy */ @@ -298,13 +296,6 @@ public class WifiNetworkHistory { out.writeUTF(NL); out.writeUTF(NL); } - if (deletedSSIDs != null && deletedSSIDs.size() > 0) { - for (Long i : deletedSSIDs) { - out.writeUTF(DELETED_CRC32_KEY); - out.writeUTF(String.valueOf(i)); - out.writeUTF(NL); - } - } if (deletedEphemeralSSIDs != null && deletedEphemeralSSIDs.size() > 0) { for (String ssid : deletedEphemeralSSIDs) { out.writeUTF(DELETED_EPHEMERAL_KEY); @@ -327,7 +318,6 @@ public class WifiNetworkHistory { */ public void readNetworkHistory(Map<String, WifiConfiguration> configs, ConcurrentHashMap<Integer, ScanDetailCache> scanDetailCaches, - Set<Long> deletedSSIDs, Set<String> deletedEphemeralSSIDs) { localLog("readNetworkHistory() path:" + NETWORK_HISTORY_CONFIG_FILE); @@ -516,9 +506,6 @@ public class WifiNetworkHistory { } } break; - case DELETED_CRC32_KEY: - deletedSSIDs.add(Long.parseLong(value)); - break; case DELETED_EPHEMERAL_KEY: if (!TextUtils.isEmpty(value)) { deletedEphemeralSSIDs.add(value); |