Merge "Remove @TestApi from @SystemApi symbols"

This commit is contained in:
Anton Hansson 2020-10-20 13:45:13 +00:00 • committed by Gerrit Code Review
commit 49ca9d3ca9
11 changed files with 0 additions and 74 deletions

View file

@ -19,7 +19,6 @@ import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
@ -42,7 +41,6 @@ public class CaptivePortal implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public static final int APP_RETURN_DISMISSED = 0;
/**
* Response code from the captive portal application, indicating that the user did not login and
@ -52,7 +50,6 @@ public class CaptivePortal implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public static final int APP_RETURN_UNWANTED = 1;
/**
* Response code from the captive portal application, indicating that the user does not wish to
@ -62,7 +59,6 @@ public class CaptivePortal implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public static final int APP_RETURN_WANTED_AS_IS = 2;
/** Event offset of request codes from captive portal application. */
private static final int APP_REQUEST_BASE = 100;
@ -74,7 +70,6 @@ public class CaptivePortal implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public static final int APP_REQUEST_REEVALUATION_REQUIRED = APP_REQUEST_BASE + 0;
private final IBinder mBinder;
@ -154,7 +149,6 @@ public class CaptivePortal implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public void useNetwork() {
try {
ICaptivePortal.Stub.asInterface(mBinder).appResponse(APP_RETURN_WANTED_AS_IS);
@ -167,7 +161,6 @@ public class CaptivePortal implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
@RequiresPermission(android.Manifest.permission.NETWORK_STACK)
public void reevaluateNetwork() {
try {
@ -183,7 +176,6 @@ public class CaptivePortal implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public void logEvent(@EventId int eventId, @NonNull String packageName) {
try {
ICaptivePortal.Stub.asInterface(mBinder).logEvent(eventId, packageName);

View file

@ -19,7 +19,6 @@ package android.net;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
import android.os.Parcelable;
@ -30,7 +29,6 @@ import java.util.Objects;
* @hide
*/
@SystemApi
@TestApi
public final class CaptivePortalData implements Parcelable {
private final long mRefreshTimeMillis;
@Nullable

View file

@ -269,7 +269,6 @@ public class ConnectivityManager {
* {@hide}
*/
@SystemApi
@TestApi
public static final String EXTRA_CAPTIVE_PORTAL_PROBE_SPEC =
"android.net.extra.CAPTIVE_PORTAL_PROBE_SPEC";
@ -278,7 +277,6 @@ public class ConnectivityManager {
* {@hide}
*/
@SystemApi
@TestApi
public static final String EXTRA_CAPTIVE_PORTAL_USER_AGENT =
"android.net.extra.CAPTIVE_PORTAL_USER_AGENT";
@ -4413,7 +4411,6 @@ public class ConnectivityManager {
* @hide
*/
@SystemApi
@TestApi
@RequiresPermission(NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK)
public void startCaptivePortalApp(@NonNull Network network, @NonNull Bundle appExtras) {
try {

View file

@ -19,7 +19,6 @@ package android.net;
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Pair;
@ -88,7 +87,6 @@ public final class IpPrefix implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public IpPrefix(@NonNull InetAddress address, @IntRange(from = 0, to = 128) int prefixLength) {
// We don't reuse the (byte[], int) constructor because it calls clone() on the byte array,
// which is unnecessary because getAddress() already returns a clone.
@ -107,7 +105,6 @@ public final class IpPrefix implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public IpPrefix(@NonNull String prefix) {
// We don't reuse the (InetAddress, int) constructor because "error: call to this must be
// first statement in constructor". We could factor out setting the member variables to an

View file

@ -30,7 +30,6 @@ import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.os.Build;
import android.os.Parcel;
@ -158,7 +157,6 @@ public class LinkAddress implements Parcelable {
* @return true if the address is IPv6.
* @hide
*/
@TestApi
@SystemApi
public boolean isIpv6() {
return address instanceof Inet6Address;
@ -180,7 +178,6 @@ public class LinkAddress implements Parcelable {
* @return true if the address is IPv4 or is a mapped IPv4 address.
* @hide
*/
@TestApi
@SystemApi
public boolean isIpv4() {
return address instanceof Inet4Address;
@ -243,7 +240,6 @@ public class LinkAddress implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public LinkAddress(@NonNull InetAddress address, @IntRange(from = 0, to = 128) int prefixLength,
int flags, int scope) {
init(address, prefixLength, flags, scope, LIFETIME_UNKNOWN, LIFETIME_UNKNOWN);
@ -275,7 +271,6 @@ public class LinkAddress implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public LinkAddress(@NonNull InetAddress address, @IntRange(from = 0, to = 128) int prefixLength,
int flags, int scope, long deprecationTime, long expirationTime) {
init(address, prefixLength, flags, scope, deprecationTime, expirationTime);
@ -289,7 +284,6 @@ public class LinkAddress implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public LinkAddress(@NonNull InetAddress address,
@IntRange(from = 0, to = 128) int prefixLength) {
this(address, prefixLength, 0, 0);
@ -314,7 +308,6 @@ public class LinkAddress implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public LinkAddress(@NonNull String address) {
this(address, 0, 0);
this.scope = scopeForUnicastAddress(this.address);
@ -329,7 +322,6 @@ public class LinkAddress implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public LinkAddress(@NonNull String address, int flags, int scope) {
// This may throw an IllegalArgumentException; catching it is the caller's responsibility.
// TODO: consider rejecting mapped IPv4 addresses such as "::ffff:192.0.2.5/24".
@ -389,7 +381,6 @@ public class LinkAddress implements Parcelable {
* otherwise.
* @hide
*/
@TestApi
@SystemApi
public boolean isSameAddressAs(@Nullable LinkAddress other) {
if (other == null) {
@ -469,7 +460,6 @@ public class LinkAddress implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public long getDeprecationTime() {
return deprecationTime;
}
@ -485,7 +475,6 @@ public class LinkAddress implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public long getExpirationTime() {
return expirationTime;
}
@ -496,7 +485,6 @@ public class LinkAddress implements Parcelable {
*
* @hide
*/
@TestApi
@SystemApi
public boolean isGlobalPreferred() {
/**

View file

@ -19,7 +19,6 @@ package android.net;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.net.util.LinkPropertiesUtils;
import android.os.Build;
@ -161,7 +160,6 @@ public final class LinkProperties implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public LinkProperties(@Nullable LinkProperties source) {
this(source, false /* parcelSensitiveFields */);
}
@ -177,7 +175,6 @@ public final class LinkProperties implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public LinkProperties(@Nullable LinkProperties source, boolean parcelSensitiveFields) {
mParcelSensitiveFields = parcelSensitiveFields;
if (source == null) return;
@ -292,7 +289,6 @@ public final class LinkProperties implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public boolean addLinkAddress(@NonNull LinkAddress address) {
if (address == null) {
return false;
@ -321,7 +317,6 @@ public final class LinkProperties implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public boolean removeLinkAddress(@NonNull LinkAddress toRemove) {
int i = findLinkAddressIndex(toRemove);
if (i >= 0) {
@ -375,7 +370,6 @@ public final class LinkProperties implements Parcelable {
* @return true if the DNS server was added, false if it was already present.
* @hide
*/
@TestApi
@SystemApi
public boolean addDnsServer(@NonNull InetAddress dnsServer) {
if (dnsServer != null && !mDnses.contains(dnsServer)) {
@ -392,7 +386,6 @@ public final class LinkProperties implements Parcelable {
* @return true if the DNS server was removed, false if it did not exist.
* @hide
*/
@TestApi
@SystemApi
public boolean removeDnsServer(@NonNull InetAddress dnsServer) {
return mDnses.remove(dnsServer);
@ -427,7 +420,6 @@ public final class LinkProperties implements Parcelable {
* @param usePrivateDns The private DNS state.
* @hide
*/
@TestApi
@SystemApi
public void setUsePrivateDns(boolean usePrivateDns) {
mUsePrivateDns = usePrivateDns;
@ -454,7 +446,6 @@ public final class LinkProperties implements Parcelable {
* @param privateDnsServerName The private DNS server name.
* @hide
*/
@TestApi
@SystemApi
public void setPrivateDnsServerName(@Nullable String privateDnsServerName) {
mPrivateDnsServerName = privateDnsServerName;
@ -533,7 +524,6 @@ public final class LinkProperties implements Parcelable {
* object.
* @hide
*/
@TestApi
@SystemApi
public void setValidatedPrivateDnsServers(@NonNull Collection<InetAddress> dnsServers) {
mValidatedPrivateDnses.clear();
@ -550,7 +540,6 @@ public final class LinkProperties implements Parcelable {
* DNS servers on this link.
* @hide
*/
@TestApi
@SystemApi
public @NonNull List<InetAddress> getValidatedPrivateDnsServers() {
return Collections.unmodifiableList(mValidatedPrivateDnses);
@ -591,7 +580,6 @@ public final class LinkProperties implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public void setPcscfServers(@NonNull Collection<InetAddress> pcscfServers) {
mPcscfs.clear();
for (InetAddress pcscfServer: pcscfServers) {
@ -607,7 +595,6 @@ public final class LinkProperties implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public @NonNull List<InetAddress> getPcscfServers() {
return Collections.unmodifiableList(mPcscfs);
}
@ -661,7 +648,6 @@ public final class LinkProperties implements Parcelable {
*
* @hide
*/
@TestApi
@SystemApi
public void setTcpBufferSizes(@Nullable String tcpBufferSizes) {
mTcpBufferSizes = tcpBufferSizes;
@ -674,7 +660,6 @@ public final class LinkProperties implements Parcelable {
*
* @hide
*/
@TestApi
@SystemApi
public @Nullable String getTcpBufferSizes() {
return mTcpBufferSizes;
@ -743,7 +728,6 @@ public final class LinkProperties implements Parcelable {
*
* @hide
*/
@TestApi
@SystemApi
public boolean removeRoute(@NonNull RouteInfo route) {
return Objects.equals(mIfaceName, route.getInterface()) && mRoutes.remove(route);
@ -1020,7 +1004,6 @@ public final class LinkProperties implements Parcelable {
* @return {@code true} if there is an IPv4 address, {@code false} otherwise.
* @hide
*/
@TestApi
@SystemApi
public boolean hasIpv4Address() {
for (LinkAddress address : mLinkAddresses) {
@ -1061,7 +1044,6 @@ public final class LinkProperties implements Parcelable {
* @return {@code true} if there is a global preferred IPv6 address, {@code false} otherwise.
* @hide
*/
@TestApi
@SystemApi
public boolean hasGlobalIpv6Address() {
for (LinkAddress address : mLinkAddresses) {
@ -1148,7 +1130,6 @@ public final class LinkProperties implements Parcelable {
* @return {@code true} if there is an IPv6 default route, {@code false} otherwise.
* @hide
*/
@TestApi
@SystemApi
public boolean hasIpv6DefaultRoute() {
for (RouteInfo r : mRoutes) {
@ -1264,7 +1245,6 @@ public final class LinkProperties implements Parcelable {
* @return {@code true} if the link is provisioned, {@code false} otherwise.
* @hide
*/
@TestApi
@SystemApi
public boolean isIpv4Provisioned() {
return (hasIpv4Address()
@ -1279,7 +1259,6 @@ public final class LinkProperties implements Parcelable {
* @return {@code true} if the link is provisioned, {@code false} otherwise.
* @hide
*/
@TestApi
@SystemApi
public boolean isIpv6Provisioned() {
return (hasGlobalIpv6Address()
@ -1307,7 +1286,6 @@ public final class LinkProperties implements Parcelable {
* @return {@code true} if the link is provisioned, {@code false} otherwise.
* @hide
*/
@TestApi
@SystemApi
public boolean isProvisioned() {
return (isIpv4Provisioned() || isIpv6Provisioned());
@ -1320,7 +1298,6 @@ public final class LinkProperties implements Parcelable {
* {@code false} otherwise.
* @hide
*/
@TestApi
@SystemApi
public boolean isReachable(@NonNull InetAddress ip) {
final List<RouteInfo> allRoutes = getAllRoutes();
@ -1577,7 +1554,6 @@ public final class LinkProperties implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public void setCaptivePortalApiUrl(@Nullable Uri url) {
mCaptivePortalApiUrl = url;
}
@ -1592,7 +1568,6 @@ public final class LinkProperties implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
@Nullable
public Uri getCaptivePortalApiUrl() {
return mCaptivePortalApiUrl;
@ -1603,7 +1578,6 @@ public final class LinkProperties implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public void setCaptivePortalData(@Nullable CaptivePortalData data) {
mCaptivePortalData = data;
}
@ -1617,7 +1591,6 @@ public final class LinkProperties implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
@Nullable
public CaptivePortalData getCaptivePortalData() {
return mCaptivePortalData;

View file

@ -18,7 +18,6 @@ package android.net;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@ -127,7 +126,6 @@ public class Network implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public Network(@NonNull Network that) {
this(that.netId, that.mPrivateDnsBypass);
}
@ -164,7 +162,6 @@ public class Network implements Parcelable {
*
* @hide
*/
@TestApi
@SystemApi
public @NonNull Network getPrivateDnsBypassingCopy() {
return new Network(netId, true);
@ -175,7 +172,6 @@ public class Network implements Parcelable {
*
* @hide
*/
@TestApi
@SystemApi
public int getNetId() {
return netId;

View file

@ -850,7 +850,6 @@ public final class NetworkCapabilities implements Parcelable {
* @return an array of transport type values for this instance.
* @hide
*/
@TestApi
@SystemApi
@NonNull public @Transport int[] getTransportTypes() {
return BitUtils.unpackBits(mTransportTypes);
@ -1025,7 +1024,6 @@ public final class NetworkCapabilities implements Parcelable {
*/
@NonNull
@SystemApi
@TestApi
public int[] getAdministratorUids() {
return Arrays.copyOf(mAdministratorUids, mAdministratorUids.length);
}
@ -1506,7 +1504,6 @@ public final class NetworkCapabilities implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public @Nullable String getSsid() {
return mSSID;
}
@ -1590,7 +1587,6 @@ public final class NetworkCapabilities implements Parcelable {
*
* @hide
*/
@TestApi
@SystemApi
public boolean satisfiedByNetworkCapabilities(@Nullable NetworkCapabilities nc) {
return satisfiedByNetworkCapabilities(nc, false);
@ -2136,7 +2132,6 @@ public final class NetworkCapabilities implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public static final class Builder {
private final NetworkCapabilities mCaps;

View file

@ -20,7 +20,6 @@ import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.net.util.NetUtils;
import android.os.Build;
@ -87,17 +86,14 @@ public final class RouteInfo implements Parcelable {
/** Unicast route. @hide */
@SystemApi
@TestApi
public static final int RTN_UNICAST = 1;
/** Unreachable route. @hide */
@SystemApi
@TestApi
public static final int RTN_UNREACHABLE = 7;
/** Throw route. @hide */
@SystemApi
@TestApi
public static final int RTN_THROW = 9;
/**
@ -135,7 +131,6 @@ public final class RouteInfo implements Parcelable {
* @hide
*/
@SystemApi
@TestApi
public RouteInfo(@Nullable IpPrefix destination, @Nullable InetAddress gateway,
@Nullable String iface, @RouteType int type) {
this(destination, gateway, iface, type, 0);
@ -397,7 +392,6 @@ public final class RouteInfo implements Parcelable {
*
* @hide
*/
@TestApi
@SystemApi
@RouteType
public int getType() {

View file

@ -19,7 +19,6 @@ package android.net;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@ -52,7 +51,6 @@ import java.util.Objects;
* @hide
*/
@SystemApi
@TestApi
public final class StaticIpConfiguration implements Parcelable {
/** @hide */
@UnsupportedAppUsage

View file

@ -19,7 +19,6 @@ package android.net.apf;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.content.res.Resources;
import android.os.Parcel;
import android.os.Parcelable;
@ -36,7 +35,6 @@ import com.android.internal.R;
* @hide
*/
@SystemApi
@TestApi
public final class ApfCapabilities implements Parcelable {
/**
* Version of APF instruction set supported for packet filtering. 0 indicates no support for