Add a hidden method to clear the capabilities of a NetworkRequest
Change-Id: I41d4f2229259d0bf9d68aa00f92f3bf4e2e71fbc
This commit is contained in:
@@ -114,6 +114,18 @@ public class NetworkRequest implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Completely clears all the {@code NetworkCapabilities} from this builder instance,
|
||||
* removing even the capabilities that are set by default when the object is constructed.
|
||||
*
|
||||
* @return The builder to facilitate chaining.
|
||||
* @hide
|
||||
*/
|
||||
public Builder clearCapabilities() {
|
||||
mNetworkCapabilities.clearAll();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the given transport requirement to this builder. These represent
|
||||
* the set of allowed transports for the request. Only networks using one
|
||||
|
||||
Reference in New Issue
Block a user