@Implements(value=android.net.NetworkCapabilities.class, minSdk=21) public class ShadowNetworkCapabilities extends Object
Modifier and Type | Field | Description |
---|---|---|
protected NetworkCapabilities |
realNetworkCapabilities |
Constructor | Description |
---|---|
ShadowNetworkCapabilities() |
Modifier and Type | Method | Description |
---|---|---|
NetworkCapabilities |
addCapability(int capability) |
Adds
capability to the NetworkCapabilities. |
NetworkCapabilities |
addTransportType(int transportType) |
Updates the transport types for this network capablities to include
transportType . |
static NetworkCapabilities |
newInstance() |
|
NetworkCapabilities |
removeCapability(int capability) |
Removes
capability from the NetworkCapabilities. |
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)
transportType
.@HiddenApi @Implementation public NetworkCapabilities removeTransportType(int transportType)
transportType
.@HiddenApi @Implementation public NetworkCapabilities addCapability(int capability)
capability
to the NetworkCapabilities.@HiddenApi @Implementation public NetworkCapabilities removeCapability(int capability)
capability
from the NetworkCapabilities.