shadows/framework/src/main/java/org/robolectric/shadows/ShadowConnectivityManager.java
public void setDefaultNetworkActive(boolean isActive) {
    defaultNetworkActive = isActive;
    if (defaultNetworkActive) {
      for (ConnectivityManager.OnNetworkActiveListener l : onNetworkActiveListeners) {
        if (l != null) {
          l.onNetworkActive();
        }
      }
    }
  }
public void setDefaultNetworkActive(boolean isActive) {
    defaultNetworkActive = isActive;
    if (defaultNetworkActive) {
      for (ConnectivityManager.OnNetworkActiveListener l : onNetworkActiveListeners) {
        if (l != null) {
          l.onNetworkActive();
        }
      }
    }
  }
Sets the active state of the default network.

By default this is true and affects the result of {@link
ConnectivityManager#isActiveNetworkMetered()}, {@link
ConnectivityManager#isDefaultNetworkActive()}, {@link ConnectivityManager#getActiveNetwork()}
and {@link ConnectivityManager#getAllNetworkInfo()}.

Calling this method with {@code true} after any listeners have been registered with {@link
ConnectivityManager#addDefaultNetworkActiveListener(OnNetworkActiveListener)} will result in
those listeners being fired.

@param isActive The active state of the default network.