diff options
-rw-r--r-- | libs/WifiTrackerLib/src/com/android/wifitrackerlib/PasspointWifiEntry.java | 4 | ||||
-rw-r--r-- | libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/PasspointWifiEntry.java b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/PasspointWifiEntry.java index cda52adc2..dec9b11f6 100644 --- a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/PasspointWifiEntry.java +++ b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/PasspointWifiEntry.java @@ -16,7 +16,7 @@ package com.android.wifitrackerlib; -import static android.net.wifi.WifiInfo.removeDoubleQuotes; +import static android.net.wifi.WifiInfo.sanitizeSsid; import static androidx.core.util.Preconditions.checkNotNull; @@ -118,7 +118,7 @@ class PasspointWifiEntry extends WifiEntry { @Override public String getSsid() { - return mWifiConfig != null ? removeDoubleQuotes(mWifiConfig.SSID) : null; + return mWifiConfig != null ? sanitizeSsid(mWifiConfig.SSID) : null; } @Override diff --git a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java index 2b6dd2566..3fa7e70c7 100644 --- a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java +++ b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java @@ -16,7 +16,7 @@ package com.android.wifitrackerlib; -import static android.net.wifi.WifiInfo.removeDoubleQuotes; +import static android.net.wifi.WifiInfo.sanitizeSsid; import static androidx.core.util.Preconditions.checkNotNull; @@ -713,11 +713,11 @@ class StandardWifiEntry extends WifiEntry { @WorkerThread void updateConfig(@Nullable WifiConfiguration wifiConfig) throws IllegalArgumentException { if (wifiConfig != null) { - if (!TextUtils.equals(mSsid, removeDoubleQuotes(wifiConfig.SSID))) { + if (!TextUtils.equals(mSsid, sanitizeSsid(wifiConfig.SSID))) { throw new IllegalArgumentException( "Attempted to update with wrong SSID!" + " Expected: " + mSsid - + ", Actual: " + removeDoubleQuotes(wifiConfig.SSID) + + ", Actual: " + sanitizeSsid(wifiConfig.SSID) + ", Config: " + wifiConfig); } if (mSecurity != getSecurityTypeFromWifiConfiguration(wifiConfig)) { @@ -761,7 +761,7 @@ class StandardWifiEntry extends WifiEntry { static String wifiConfigToStandardWifiEntryKey(@NonNull WifiConfiguration config) { checkNotNull(config, "Cannot create key with null config!"); checkNotNull(config.SSID, "Cannot create key with null SSID in config!"); - return KEY_PREFIX + removeDoubleQuotes(config.SSID) + "," + return KEY_PREFIX + sanitizeSsid(config.SSID) + "," + getSecurityTypeFromWifiConfiguration(config); } |