Merge "Add NetworkRequest#satisfiedBy to SystemApi" am: 2812b46691 am: 27d2bbc474
Change-Id: I737890e7e164728bae977db806a664c5d93c4fec
This commit is contained in:
@@ -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)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user