From d9f75865cfa1751686b5bdae61e1fa6fc689b84c Mon Sep 17 00:00:00 2001 From: Remi NGUYEN VAN Date: Wed, 23 Jan 2019 21:35:52 +0900 Subject: [PATCH] Add additional SystemApi for NetworkStack Members in this CL were missed in earlier changes. Test: m Bug: 112869080 Merged-In: I8b5b80ea7b267357eb0387d504a2f78358d6d502 Change-Id: I8b9b15f8b91962f3ef554fd222a825e471806c9e --- core/java/android/net/IpPrefix.java | 4 ++++ core/java/android/net/LinkAddress.java | 2 ++ core/java/android/net/LinkProperties.java | 11 ++++++++++- core/java/android/net/RouteInfo.java | 2 ++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/core/java/android/net/IpPrefix.java b/core/java/android/net/IpPrefix.java index 4631c56596..b996cdab51 100644 --- a/core/java/android/net/IpPrefix.java +++ b/core/java/android/net/IpPrefix.java @@ -16,6 +16,8 @@ package android.net; +import android.annotation.SystemApi; +import android.annotation.TestApi; import android.os.Parcel; import android.os.Parcelable; import android.util.Pair; @@ -83,6 +85,8 @@ public final class IpPrefix implements Parcelable { * @param prefixLength the prefix length. Must be >= 0 and <= (32 or 128) (IPv4 or IPv6). * @hide */ + @SystemApi + @TestApi public IpPrefix(InetAddress address, 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. diff --git a/core/java/android/net/LinkAddress.java b/core/java/android/net/LinkAddress.java index a536d08876..fbd602c7b2 100644 --- a/core/java/android/net/LinkAddress.java +++ b/core/java/android/net/LinkAddress.java @@ -162,6 +162,8 @@ public class LinkAddress implements Parcelable { * {@link OsConstants#RT_SCOPE_LINK} or {@link OsConstants#RT_SCOPE_SITE}). * @hide */ + @SystemApi + @TestApi public LinkAddress(InetAddress address, int prefixLength, int flags, int scope) { init(address, prefixLength, flags, scope); } diff --git a/core/java/android/net/LinkProperties.java b/core/java/android/net/LinkProperties.java index 21b6a8eb19..662870182e 100644 --- a/core/java/android/net/LinkProperties.java +++ b/core/java/android/net/LinkProperties.java @@ -174,7 +174,8 @@ public final class LinkProperties implements Parcelable { /** * @hide */ - @UnsupportedAppUsage + @SystemApi + @TestApi public LinkProperties(LinkProperties source) { if (source != null) { mIfaceName = source.mIfaceName; @@ -576,6 +577,8 @@ public final class LinkProperties implements Parcelable { * @param addresses The {@link Collection} of PCSCF servers to set in this object. * @hide */ + @SystemApi + @TestApi public void setPcscfServers(Collection pcscfServers) { mPcscfs.clear(); for (InetAddress pcscfServer: pcscfServers) { @@ -590,6 +593,8 @@ public final class LinkProperties implements Parcelable { * this link. * @hide */ + @SystemApi + @TestApi public List getPcscfServers() { return Collections.unmodifiableList(mPcscfs); } @@ -781,6 +786,8 @@ public final class LinkProperties implements Parcelable { * @return the NAT64 prefix. * @hide */ + @SystemApi + @TestApi public @Nullable IpPrefix getNat64Prefix() { return mNat64Prefix; } @@ -794,6 +801,8 @@ public final class LinkProperties implements Parcelable { * @param prefix the NAT64 prefix. * @hide */ + @SystemApi + @TestApi public void setNat64Prefix(IpPrefix prefix) { if (prefix != null && prefix.getPrefixLength() != 96) { throw new IllegalArgumentException("Only 96-bit prefixes are supported: " + prefix); diff --git a/core/java/android/net/RouteInfo.java b/core/java/android/net/RouteInfo.java index 6bf2c67da9..5c0f758209 100644 --- a/core/java/android/net/RouteInfo.java +++ b/core/java/android/net/RouteInfo.java @@ -110,6 +110,8 @@ public final class RouteInfo implements Parcelable { * * @hide */ + @SystemApi + @TestApi public RouteInfo(IpPrefix destination, InetAddress gateway, String iface, int type) { switch (type) { case RTN_UNICAST: