Package org.robolectric.shadows
Class ShadowNetworkCapabilities
- java.lang.Object
-
- org.robolectric.shadows.ShadowNetworkCapabilities
-
@Implements(value=android.net.NetworkCapabilities.class, minSdk=21) public class ShadowNetworkCapabilities extends Object
Robolectic provides overrides for fetching and updating transport.
-
-
Field Summary
Fields Modifier and Type Field Description protected NetworkCapabilities
realNetworkCapabilities
-
Constructor Summary
Constructors Constructor Description ShadowNetworkCapabilities()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkCapabilities
addCapability(int capability)
Addscapability
to the NetworkCapabilities.NetworkCapabilities
addTransportType(int transportType)
Updates the transport types for this network capablities to includetransportType
.static NetworkCapabilities
newInstance()
NetworkCapabilities
removeCapability(int capability)
Removescapability
from the NetworkCapabilities.NetworkCapabilities
removeTransportType(int transportType)
Updates the transport types for this network capablities to removetransportType
.
-
-
-
Field Detail
-
realNetworkCapabilities
@RealObject protected NetworkCapabilities realNetworkCapabilities
-
-
Method Detail
-
newInstance
public static NetworkCapabilities newInstance()
-
addTransportType
@HiddenApi @Implementation public NetworkCapabilities addTransportType(int transportType)
Updates the transport types for this network capablities to includetransportType
.
-
removeTransportType
@HiddenApi @Implementation public NetworkCapabilities removeTransportType(int transportType)
Updates the transport types for this network capablities to removetransportType
.
-
addCapability
@HiddenApi @Implementation public NetworkCapabilities addCapability(int capability)
Addscapability
to the NetworkCapabilities.
-
removeCapability
@HiddenApi @Implementation public NetworkCapabilities removeCapability(int capability)
Removescapability
from the NetworkCapabilities.
-
-