Loading core/java/android/net/NetworkIdentity.java +2 −13 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package android.net; import static android.net.ConnectivityManager.TYPE_WIFI; import static android.net.ConnectivityManager.isNetworkTypeMobile; import android.content.Context; import android.net.wifi.WifiInfo; Loading @@ -25,7 +24,6 @@ import android.net.wifi.WifiManager; import android.os.Build; import android.service.NetworkIdentityProto; import android.telephony.Annotation.NetworkType; import android.util.Slog; import android.util.proto.ProtoOutputStream; import java.util.Objects; Loading Loading @@ -193,18 +191,9 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> { boolean metered = !state.networkCapabilities.hasCapability( NetworkCapabilities.NET_CAPABILITY_NOT_METERED); if (isNetworkTypeMobile(type)) { if (state.subscriberId == null) { if (state.networkInfo.getState() != NetworkInfo.State.DISCONNECTED && state.networkInfo.getState() != NetworkInfo.State.UNKNOWN) { Slog.w(TAG, "Active mobile network without subscriber! ni = " + state.networkInfo); } } subscriberId = state.subscriberId; } else if (type == TYPE_WIFI) { if (type == TYPE_WIFI) { if (state.networkId != null) { networkId = state.networkId; } else { Loading Loading
core/java/android/net/NetworkIdentity.java +2 −13 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package android.net; import static android.net.ConnectivityManager.TYPE_WIFI; import static android.net.ConnectivityManager.isNetworkTypeMobile; import android.content.Context; import android.net.wifi.WifiInfo; Loading @@ -25,7 +24,6 @@ import android.net.wifi.WifiManager; import android.os.Build; import android.service.NetworkIdentityProto; import android.telephony.Annotation.NetworkType; import android.util.Slog; import android.util.proto.ProtoOutputStream; import java.util.Objects; Loading Loading @@ -193,18 +191,9 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> { boolean metered = !state.networkCapabilities.hasCapability( NetworkCapabilities.NET_CAPABILITY_NOT_METERED); if (isNetworkTypeMobile(type)) { if (state.subscriberId == null) { if (state.networkInfo.getState() != NetworkInfo.State.DISCONNECTED && state.networkInfo.getState() != NetworkInfo.State.UNKNOWN) { Slog.w(TAG, "Active mobile network without subscriber! ni = " + state.networkInfo); } } subscriberId = state.subscriberId; } else if (type == TYPE_WIFI) { if (type == TYPE_WIFI) { if (state.networkId != null) { networkId = state.networkId; } else { Loading