diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2015-05-20 05:49:02 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-20 05:49:03 +0000 |
commit | 4b545dfbcd6ed724d5fc01b7ba21506db99e881b (patch) | |
tree | a7f6c2235b830b7ff38ba15df7cab3e993c2691c /core/java/android/net | |
parent | 11f83882f2a4448b5a2bbbb9e23b700096ed7536 (diff) | |
parent | 84b83c5a95c9822683eec5a348893c1afba17444 (diff) | |
download | frameworks_base-4b545dfbcd6ed724d5fc01b7ba21506db99e881b.zip frameworks_base-4b545dfbcd6ed724d5fc01b7ba21506db99e881b.tar.gz frameworks_base-4b545dfbcd6ed724d5fc01b7ba21506db99e881b.tar.bz2 |
Merge "Add a hidden method to clear the capabilities of a NetworkRequest" into mnc-dev
Diffstat (limited to 'core/java/android/net')
-rw-r--r-- | core/java/android/net/NetworkRequest.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/net/NetworkRequest.java b/core/java/android/net/NetworkRequest.java index 7838b47..e61594c 100644 --- a/core/java/android/net/NetworkRequest.java +++ b/core/java/android/net/NetworkRequest.java @@ -115,6 +115,18 @@ public class NetworkRequest implements Parcelable { } /** + * 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 * of these transports will satisfy the request. If no particular transports |