Merge changes from topic "removeNI"
* changes: [FUI07] Stop making NetworkState with NetworkInfo from external callers [FUI06] Stop using NetworkInfo in NetworkState from external callers
This commit is contained in:
@@ -32,7 +32,7 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Network definition that includes strong identity. Analogous to combining
|
||||
* {@link NetworkInfo} and an IMSI.
|
||||
* {@link NetworkCapabilities} and an IMSI.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@@ -160,7 +160,7 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> {
|
||||
*/
|
||||
public static NetworkIdentity buildNetworkIdentity(Context context, NetworkState state,
|
||||
boolean defaultNetwork, @NetworkType int subType) {
|
||||
final int type = state.networkInfo.getType();
|
||||
final int legacyType = state.legacyNetworkType;
|
||||
|
||||
String subscriberId = null;
|
||||
String networkId = null;
|
||||
@@ -171,7 +171,7 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> {
|
||||
|
||||
subscriberId = state.subscriberId;
|
||||
|
||||
if (type == TYPE_WIFI) {
|
||||
if (legacyType == TYPE_WIFI) {
|
||||
if (state.networkCapabilities.getSsid() != null) {
|
||||
networkId = state.networkCapabilities.getSsid();
|
||||
if (networkId == null) {
|
||||
@@ -184,7 +184,7 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> {
|
||||
}
|
||||
}
|
||||
|
||||
return new NetworkIdentity(type, subType, subscriberId, networkId, roaming, metered,
|
||||
return new NetworkIdentity(legacyType, subType, subscriberId, networkId, roaming, metered,
|
||||
defaultNetwork);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user