Merge "Add NetworkRequest#satisfiedBy to SystemApi"
This commit is contained in:
commit
2812b46691
1 changed files with 13 additions and 0 deletions
|
|
@ -466,6 +466,19 @@ public class NetworkRequest implements Parcelable {
|
|||
return networkCapabilities.hasUnwantedCapability(capability);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true iff. the capabilities requested in this NetworkRequest are satisfied by the
|
||||
* provided {@link NetworkCapabilities}.
|
||||
*
|
||||
* @param nc Capabilities that should satisfy this NetworkRequest. null capabilities do not
|
||||
* satisfy any request.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public boolean satisfiedBy(@Nullable NetworkCapabilities nc) {
|
||||
return networkCapabilities.satisfiedByNetworkCapabilities(nc);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Builder#addTransportType(int)
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue