diff options
| author | 2020-12-04 02:03:29 +0000 | |
|---|---|---|
| committer | 2020-12-04 02:03:29 +0000 | |
| commit | 1ded24221e8fb6c22c4e8becdcc797eaef8f3a5c (patch) | |
| tree | 80ec06864efa5edf4b9fe1ddd8c1737d3dec36fc | |
| parent | ad55c3468b6c61b81601f9175c77d4561ac6df2a (diff) | |
| parent | 79664cbf54cceb1def42fd6f806e4abf0ba9dcbc (diff) | |
Merge "Set NetworkIdentity subscriberId on all networks"
| -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 { |