From f4bdf74cd620230f99eccc9ce291dfb9d257c1f4 Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Fri, 6 Apr 2018 17:35:33 +0900 Subject: [PATCH] Remove unwanted capability code per API council feedback. The addition of hasUnwantedCapability was late in the release cycle and does not simplify the API enough to be worth it. The recommendation is, in a future release, to do something more complete: not just add something like addUnwantedCapability, but also deprecate all the NET_CAPABILITY_NOT_xxx constants and add opposite NET_CAPABILITY_xxx constants for use with it. Fix: 77601789 Test: builds, boots Test: atest android.net.cts.NetworkRequestTest Test: atest android.net.cts.ConnectivityManagerTest Change-Id: Ib98fb01da4a4a0bae464787b589ad88f45002eb8 --- core/java/android/net/NetworkRequest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/java/android/net/NetworkRequest.java b/core/java/android/net/NetworkRequest.java index 82af5d3c13..6f812ac38e 100644 --- a/core/java/android/net/NetworkRequest.java +++ b/core/java/android/net/NetworkRequest.java @@ -233,6 +233,8 @@ public class NetworkRequest implements Parcelable { * * @param capability The capability to add to unwanted capability list. * @return The builder to facilitate chaining. + * + * @removed */ public Builder addUnwantedCapability(@NetworkCapabilities.NetCapability int capability) { mNetworkCapabilities.addUnwantedCapability(capability); @@ -439,6 +441,8 @@ public class NetworkRequest implements Parcelable { /** * @see Builder#addUnwantedCapability(int) + * + * @removed */ public boolean hasUnwantedCapability(@NetCapability int capability) { return networkCapabilities.hasUnwantedCapability(capability);