Merge "Remove the main thread blocking call to get SSID" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-04-02 14:55:05 +00:00
committed by Android (Google) Code Review

View File

@@ -26,7 +26,6 @@ import android.net.NetworkKey;
import android.net.NetworkRequest;
import android.net.NetworkScoreManager;
import android.net.ScoredNetwork;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.net.wifi.WifiNetworkScoreCache;
@@ -346,14 +345,6 @@ public class WifiStatusTracker {
if (ssid != null && !WifiManager.UNKNOWN_SSID.equals(ssid)) {
return ssid;
}
// OK, it's not in the connectionInfo; we have to go hunting for it
List<WifiConfiguration> networks = mWifiManager.getConfiguredNetworks();
int length = networks.size();
for (int i = 0; i < length; i++) {
if (networks.get(i).networkId == info.getNetworkId()) {
return networks.get(i).SSID;
}
}
return null;
}