Loading core/java/android/net/NetworkIdentity.java +5 −9 Original line number Diff line number Diff line Loading @@ -198,17 +198,13 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> { final int oemManaged = getOemBitfield(snapshot.networkCapabilities); if (legacyType == TYPE_WIFI) { if (snapshot.networkCapabilities.getSsid() != null) { networkId = snapshot.networkCapabilities.getSsid(); if (networkId == null) { // TODO: Figure out if this code path never runs. If so, remove them. final WifiManager wifi = (WifiManager) context.getSystemService( Context.WIFI_SERVICE); final WifiManager wifi = context.getSystemService(WifiManager.class); final WifiInfo info = wifi.getConnectionInfo(); networkId = info != null ? info.getSSID() : null; } } } return new NetworkIdentity(legacyType, subType, subscriberId, networkId, roaming, metered, defaultNetwork, oemManaged); Loading Loading
core/java/android/net/NetworkIdentity.java +5 −9 Original line number Diff line number Diff line Loading @@ -198,17 +198,13 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> { final int oemManaged = getOemBitfield(snapshot.networkCapabilities); if (legacyType == TYPE_WIFI) { if (snapshot.networkCapabilities.getSsid() != null) { networkId = snapshot.networkCapabilities.getSsid(); if (networkId == null) { // TODO: Figure out if this code path never runs. If so, remove them. final WifiManager wifi = (WifiManager) context.getSystemService( Context.WIFI_SERVICE); final WifiManager wifi = context.getSystemService(WifiManager.class); final WifiInfo info = wifi.getConnectionInfo(); networkId = info != null ? info.getSSID() : null; } } } return new NetworkIdentity(legacyType, subType, subscriberId, networkId, roaming, metered, defaultNetwork, oemManaged); Loading