diff --git a/api/current.txt b/api/current.txt index b66f830981f6b..b1eac5947c7a5 100644 --- a/api/current.txt +++ b/api/current.txt @@ -28928,6 +28928,7 @@ package android.net { method @Nullable public String getInterfaceName(); method @NonNull public java.util.List getLinkAddresses(); method public int getMtu(); + method @Nullable public android.net.IpPrefix getNat64Prefix(); method @Nullable public String getPrivateDnsServerName(); method @NonNull public java.util.List getRoutes(); method public boolean isPrivateDnsActive(); @@ -28938,6 +28939,7 @@ package android.net { method public void setInterfaceName(@Nullable String); method public void setLinkAddresses(@NonNull java.util.Collection); method public void setMtu(int); + method public void setNat64Prefix(@Nullable android.net.IpPrefix); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator CREATOR; } diff --git a/api/system-current.txt b/api/system-current.txt index 5a695a5c1c504..7cd31df6da913 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -4441,7 +4441,6 @@ package android.net { ctor public LinkProperties(@Nullable android.net.LinkProperties); method public boolean addDnsServer(@NonNull java.net.InetAddress); method public boolean addLinkAddress(@NonNull android.net.LinkAddress); - method @Nullable public android.net.IpPrefix getNat64Prefix(); method @NonNull public java.util.List getPcscfServers(); method @Nullable public String getTcpBufferSizes(); method @NonNull public java.util.List getValidatedPrivateDnsServers(); @@ -4455,7 +4454,6 @@ package android.net { method public boolean removeDnsServer(@NonNull java.net.InetAddress); method public boolean removeLinkAddress(@NonNull android.net.LinkAddress); method public boolean removeRoute(@NonNull android.net.RouteInfo); - method public void setNat64Prefix(@Nullable android.net.IpPrefix); method public void setPcscfServers(@NonNull java.util.Collection); method public void setPrivateDnsServerName(@Nullable String); method public void setTcpBufferSizes(@Nullable String); diff --git a/api/test-current.txt b/api/test-current.txt index 94453228e5aa1..73df14737c6b5 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -1466,7 +1466,6 @@ package android.net { ctor public LinkProperties(@Nullable android.net.LinkProperties); method public boolean addDnsServer(@NonNull java.net.InetAddress); method public boolean addLinkAddress(@NonNull android.net.LinkAddress); - method @Nullable public android.net.IpPrefix getNat64Prefix(); method @NonNull public java.util.List getPcscfServers(); method @Nullable public String getTcpBufferSizes(); method @NonNull public java.util.List getValidatedPrivateDnsServers(); @@ -1480,7 +1479,6 @@ package android.net { method public boolean removeDnsServer(@NonNull java.net.InetAddress); method public boolean removeLinkAddress(@NonNull android.net.LinkAddress); method public boolean removeRoute(@NonNull android.net.RouteInfo); - method public void setNat64Prefix(@Nullable android.net.IpPrefix); method public void setPcscfServers(@NonNull java.util.Collection); method public void setPrivateDnsServerName(@Nullable String); method public void setTcpBufferSizes(@Nullable String); diff --git a/core/java/android/net/LinkProperties.java b/core/java/android/net/LinkProperties.java index 0706e755d1333..8e1834113486e 100644 --- a/core/java/android/net/LinkProperties.java +++ b/core/java/android/net/LinkProperties.java @@ -762,10 +762,7 @@ public final class LinkProperties implements Parcelable { * Returns the NAT64 prefix in use on this link, if any. * * @return the NAT64 prefix or {@code null}. - * @hide */ - @SystemApi - @TestApi public @Nullable IpPrefix getNat64Prefix() { return mNat64Prefix; } @@ -777,10 +774,7 @@ public final class LinkProperties implements Parcelable { * 128-bit IPv6 address) are supported or {@code null} for no prefix. * * @param prefix the NAT64 prefix. - * @hide */ - @SystemApi - @TestApi public void setNat64Prefix(@Nullable IpPrefix prefix) { if (prefix != null && prefix.getPrefixLength() != 96) { throw new IllegalArgumentException("Only 96-bit prefixes are supported: " + prefix);