OSDN Git Service

Merge "Disable roaming sanity checking." into pi-dev
authorJeff Sharkey <jsharkey@google.com>
Mon, 9 Apr 2018 23:57:28 +0000 (23:57 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Mon, 9 Apr 2018 23:57:28 +0000 (23:57 +0000)
core/java/android/net/NetworkState.java

index b00cb48..321f971 100644 (file)
@@ -26,6 +26,8 @@ import android.util.Slog;
  * @hide
  */
 public class NetworkState implements Parcelable {
+    private static final boolean SANITY_CHECK_ROAMING = false;
+
     public static final NetworkState EMPTY = new NetworkState(null, null, null, null, null, null);
 
     public final NetworkInfo networkInfo;
@@ -47,7 +49,7 @@ public class NetworkState implements Parcelable {
 
         // This object is an atomic view of a network, so the various components
         // should always agree on roaming state.
-        if (networkInfo != null && networkCapabilities != null) {
+        if (SANITY_CHECK_ROAMING && networkInfo != null && networkCapabilities != null) {
             if (networkInfo.isRoaming() == networkCapabilities
                     .hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING)) {
                 Slog.wtf("NetworkState", "Roaming state disagreement between " + networkInfo