@Implements(value=android.net.NetworkCapabilities.class, minSdk=21) public class ShadowNetworkCapabilities extends Object
Robolectic provides overrides for fetching and updating transport.
Modifier and Type | Field and Description |
---|---|
protected NetworkCapabilities |
realNetworkCapabilities |
Constructor and Description |
---|
ShadowNetworkCapabilities() |
Modifier and Type | Method and Description |
---|---|
NetworkCapabilities |
addTransportType(int transportType)
Updates the transport types for this network capablities to include
transportType . |
static NetworkCapabilities |
newInstance() |
NetworkCapabilities |
removeTransportType(int transportType)
Updates the transport types for this network capablities to remove
transportType . |
@RealObject protected NetworkCapabilities realNetworkCapabilities
public static NetworkCapabilities newInstance()
@HiddenApi @Implementation public NetworkCapabilities addTransportType(int transportType)
Updates the transport types for this network capablities to include transportType
.
@HiddenApi @Implementation public NetworkCapabilities removeTransportType(int transportType)
Updates the transport types for this network capablities to remove transportType
.