Merge "Add hasUnwantedCapability method" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3d735d02d6
@@ -172,6 +172,8 @@ public class NetworkRequest implements Parcelable {
|
|||||||
* If the given capability was previously added to the list of unwanted capabilities
|
* If the given capability was previously added to the list of unwanted capabilities
|
||||||
* then the capability will also be removed from the list of unwanted capabilities.
|
* then the capability will also be removed from the list of unwanted capabilities.
|
||||||
*
|
*
|
||||||
|
* @see #addUnwantedCapability(int)
|
||||||
|
*
|
||||||
* @param capability The capability to add.
|
* @param capability The capability to add.
|
||||||
* @return The builder to facilitate chaining
|
* @return The builder to facilitate chaining
|
||||||
* {@code builder.addCapability(...).addCapability();}.
|
* {@code builder.addCapability(...).addCapability();}.
|
||||||
@@ -435,6 +437,13 @@ public class NetworkRequest implements Parcelable {
|
|||||||
return networkCapabilities.hasCapability(capability);
|
return networkCapabilities.hasCapability(capability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see Builder#addUnwantedCapability(int)
|
||||||
|
*/
|
||||||
|
public boolean hasUnwantedCapability(@NetCapability int capability) {
|
||||||
|
return networkCapabilities.hasUnwantedCapability(capability);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see Builder#addTransportType(int)
|
* @see Builder#addTransportType(int)
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user