diff options
| author | 2020-12-04 04:11:56 +0000 | |
|---|---|---|
| committer | 2020-12-04 04:11:56 +0000 | |
| commit | 3e28c9d2425c55fa098e56bf2d91823d054a52c3 (patch) | |
| tree | 8c5db9a37a315dabd271f6f8a60279104e374f3d | |
| parent | 9389dc60bbe2167a0eaadcab14c677c130ce98a6 (diff) | |
| parent | 1a55bddfc3b188102351a15fddd51df99879eac3 (diff) | |
Merge "Set NetworkIdentity subscriberId on all networks" am: 1ded24221e am: 1a55bddfc3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1512877
Change-Id: Ib1009d0ce0e54330c00aee7fa1c45abe43c86777
| -rw-r--r-- | core/java/android/net/NetworkIdentity.java | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/core/java/android/net/NetworkIdentity.java b/core/java/android/net/NetworkIdentity.java index efbfbf93f9fe..a0dc72d4adbf 100644 --- a/core/java/android/net/NetworkIdentity.java +++ b/core/java/android/net/NetworkIdentity.java @@ -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; @@ -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; @@ -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; + subscriberId = state.subscriberId; - } else if (type == TYPE_WIFI) { + if (type == TYPE_WIFI) { if (state.networkId != null) { networkId = state.networkId; } else { |