Loading api/system-current.txt +26 −0 Original line number Original line Diff line number Diff line Loading @@ -3081,7 +3081,12 @@ package android.net { method public void onTetheringStarted(); method public void onTetheringStarted(); } } public final class IpPrefix implements android.os.Parcelable { ctor public IpPrefix(java.net.InetAddress, int); } public class LinkAddress implements android.os.Parcelable { public class LinkAddress implements android.os.Parcelable { ctor public LinkAddress(java.net.InetAddress, int, int, int); ctor public LinkAddress(java.net.InetAddress, int); ctor public LinkAddress(java.net.InetAddress, int); ctor public LinkAddress(String); ctor public LinkAddress(String); method public boolean isGlobalPreferred(); method public boolean isGlobalPreferred(); Loading @@ -3092,9 +3097,12 @@ package android.net { public final class LinkProperties implements android.os.Parcelable { public final class LinkProperties implements android.os.Parcelable { ctor public LinkProperties(); ctor public LinkProperties(); ctor public LinkProperties(android.net.LinkProperties); method public boolean addDnsServer(java.net.InetAddress); method public boolean addDnsServer(java.net.InetAddress); method public boolean addRoute(android.net.RouteInfo); method public boolean addRoute(android.net.RouteInfo); method public void clear(); method public void clear(); method @Nullable public android.net.IpPrefix getNat64Prefix(); method public java.util.List<java.net.InetAddress> getPcscfServers(); method public String getTcpBufferSizes(); method public String getTcpBufferSizes(); method public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers(); method public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers(); method public boolean hasGlobalIPv6Address(); method public boolean hasGlobalIPv6Address(); Loading @@ -3112,6 +3120,8 @@ package android.net { method public void setInterfaceName(String); method public void setInterfaceName(String); method public void setLinkAddresses(java.util.Collection<android.net.LinkAddress>); method public void setLinkAddresses(java.util.Collection<android.net.LinkAddress>); method public void setMtu(int); method public void setMtu(int); method public void setNat64Prefix(android.net.IpPrefix); method public void setPcscfServers(java.util.Collection<java.net.InetAddress>); method public void setPrivateDnsServerName(@Nullable String); method public void setPrivateDnsServerName(@Nullable String); method public void setTcpBufferSizes(String); method public void setTcpBufferSizes(String); method public void setUsePrivateDns(boolean); method public void setUsePrivateDns(boolean); Loading Loading @@ -3166,6 +3176,7 @@ package android.net { } } public final class RouteInfo implements android.os.Parcelable { public final class RouteInfo implements android.os.Parcelable { ctor public RouteInfo(android.net.IpPrefix, java.net.InetAddress, String, int); method public int getType(); method public int getType(); field public static final int RTN_THROW = 9; // 0x9 field public static final int RTN_THROW = 9; // 0x9 field public static final int RTN_UNICAST = 1; // 0x1 field public static final int RTN_UNICAST = 1; // 0x1 Loading Loading @@ -3299,6 +3310,7 @@ package android.net.metrics { } } public class IpConnectivityLog { public class IpConnectivityLog { ctor public IpConnectivityLog(); method public boolean log(long, android.net.metrics.IpConnectivityLog.Event); method public boolean log(long, android.net.metrics.IpConnectivityLog.Event); method public boolean log(String, android.net.metrics.IpConnectivityLog.Event); method public boolean log(String, android.net.metrics.IpConnectivityLog.Event); method public boolean log(android.net.Network, int[], android.net.metrics.IpConnectivityLog.Event); method public boolean log(android.net.Network, int[], android.net.metrics.IpConnectivityLog.Event); Loading Loading @@ -3347,6 +3359,20 @@ package android.net.metrics { field public static final int NETWORK_VALIDATION_FAILED = 3; // 0x3 field public static final int NETWORK_VALIDATION_FAILED = 3; // 0x3 } } public final class RaEvent implements android.net.metrics.IpConnectivityLog.Event { } public static class RaEvent.Builder { ctor public RaEvent.Builder(); method public android.net.metrics.RaEvent build(); method public android.net.metrics.RaEvent.Builder updateDnsslLifetime(long); method public android.net.metrics.RaEvent.Builder updatePrefixPreferredLifetime(long); method public android.net.metrics.RaEvent.Builder updatePrefixValidLifetime(long); method public android.net.metrics.RaEvent.Builder updateRdnssLifetime(long); method public android.net.metrics.RaEvent.Builder updateRouteInfoLifetime(long); method public android.net.metrics.RaEvent.Builder updateRouterLifetime(long); } public final class ValidationProbeEvent implements android.net.metrics.IpConnectivityLog.Event { public final class ValidationProbeEvent implements android.net.metrics.IpConnectivityLog.Event { method public static String getProbeName(int); method public static String getProbeName(int); field public static final int DNS_FAILURE = 0; // 0x0 field public static final int DNS_FAILURE = 0; // 0x0 Loading api/test-current.txt +26 −0 Original line number Original line Diff line number Diff line Loading @@ -611,11 +611,16 @@ package android.net { field public static final String EXTRA_CAPTIVE_PORTAL_USER_AGENT = "android.net.extra.CAPTIVE_PORTAL_USER_AGENT"; field public static final String EXTRA_CAPTIVE_PORTAL_USER_AGENT = "android.net.extra.CAPTIVE_PORTAL_USER_AGENT"; } } public final class IpPrefix implements android.os.Parcelable { ctor public IpPrefix(java.net.InetAddress, int); } public final class IpSecManager { public final class IpSecManager { field public static final int INVALID_SECURITY_PARAMETER_INDEX = 0; // 0x0 field public static final int INVALID_SECURITY_PARAMETER_INDEX = 0; // 0x0 } } public class LinkAddress implements android.os.Parcelable { public class LinkAddress implements android.os.Parcelable { ctor public LinkAddress(java.net.InetAddress, int, int, int); method public boolean isGlobalPreferred(); method public boolean isGlobalPreferred(); method public boolean isIPv4(); method public boolean isIPv4(); method public boolean isIPv6(); method public boolean isIPv6(); Loading @@ -623,7 +628,10 @@ package android.net { } } public final class LinkProperties implements android.os.Parcelable { public final class LinkProperties implements android.os.Parcelable { ctor public LinkProperties(android.net.LinkProperties); method public boolean addDnsServer(java.net.InetAddress); method public boolean addDnsServer(java.net.InetAddress); method @Nullable public android.net.IpPrefix getNat64Prefix(); method public java.util.List<java.net.InetAddress> getPcscfServers(); method public String getTcpBufferSizes(); method public String getTcpBufferSizes(); method public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers(); method public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers(); method public boolean hasGlobalIPv6Address(); method public boolean hasGlobalIPv6Address(); Loading @@ -635,6 +643,8 @@ package android.net { method public boolean isReachable(java.net.InetAddress); method public boolean isReachable(java.net.InetAddress); method public boolean removeDnsServer(java.net.InetAddress); method public boolean removeDnsServer(java.net.InetAddress); method public boolean removeRoute(android.net.RouteInfo); method public boolean removeRoute(android.net.RouteInfo); method public void setNat64Prefix(android.net.IpPrefix); method public void setPcscfServers(java.util.Collection<java.net.InetAddress>); method public void setPrivateDnsServerName(@Nullable String); method public void setPrivateDnsServerName(@Nullable String); method public void setTcpBufferSizes(String); method public void setTcpBufferSizes(String); method public void setUsePrivateDns(boolean); method public void setUsePrivateDns(boolean); Loading @@ -652,6 +662,7 @@ package android.net { } } public final class RouteInfo implements android.os.Parcelable { public final class RouteInfo implements android.os.Parcelable { ctor public RouteInfo(android.net.IpPrefix, java.net.InetAddress, String, int); method public int getType(); method public int getType(); field public static final int RTN_THROW = 9; // 0x9 field public static final int RTN_THROW = 9; // 0x9 field public static final int RTN_UNICAST = 1; // 0x1 field public static final int RTN_UNICAST = 1; // 0x1 Loading Loading @@ -738,6 +749,7 @@ package android.net.metrics { } } public class IpConnectivityLog { public class IpConnectivityLog { ctor public IpConnectivityLog(); method public boolean log(long, android.net.metrics.IpConnectivityLog.Event); method public boolean log(long, android.net.metrics.IpConnectivityLog.Event); method public boolean log(String, android.net.metrics.IpConnectivityLog.Event); method public boolean log(String, android.net.metrics.IpConnectivityLog.Event); method public boolean log(android.net.Network, int[], android.net.metrics.IpConnectivityLog.Event); method public boolean log(android.net.Network, int[], android.net.metrics.IpConnectivityLog.Event); Loading Loading @@ -786,6 +798,20 @@ package android.net.metrics { field public static final int NETWORK_VALIDATION_FAILED = 3; // 0x3 field public static final int NETWORK_VALIDATION_FAILED = 3; // 0x3 } } public final class RaEvent implements android.net.metrics.IpConnectivityLog.Event { } public static class RaEvent.Builder { ctor public RaEvent.Builder(); method public android.net.metrics.RaEvent build(); method public android.net.metrics.RaEvent.Builder updateDnsslLifetime(long); method public android.net.metrics.RaEvent.Builder updatePrefixPreferredLifetime(long); method public android.net.metrics.RaEvent.Builder updatePrefixValidLifetime(long); method public android.net.metrics.RaEvent.Builder updateRdnssLifetime(long); method public android.net.metrics.RaEvent.Builder updateRouteInfoLifetime(long); method public android.net.metrics.RaEvent.Builder updateRouterLifetime(long); } public final class ValidationProbeEvent implements android.net.metrics.IpConnectivityLog.Event { public final class ValidationProbeEvent implements android.net.metrics.IpConnectivityLog.Event { method public static String getProbeName(int); method public static String getProbeName(int); field public static final int DNS_FAILURE = 0; // 0x0 field public static final int DNS_FAILURE = 0; // 0x0 Loading core/java/android/net/IpPrefix.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.net; package android.net; import android.annotation.SystemApi; import android.annotation.TestApi; import android.os.Parcel; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable; import android.util.Pair; import android.util.Pair; Loading Loading @@ -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). * @param prefixLength the prefix length. Must be >= 0 and <= (32 or 128) (IPv4 or IPv6). * @hide * @hide */ */ @SystemApi @TestApi public IpPrefix(InetAddress address, int prefixLength) { public IpPrefix(InetAddress address, int prefixLength) { // We don't reuse the (byte[], int) constructor because it calls clone() on the byte array, // 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. // which is unnecessary because getAddress() already returns a clone. Loading core/java/android/net/LinkAddress.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -162,6 +162,8 @@ public class LinkAddress implements Parcelable { * {@link OsConstants#RT_SCOPE_LINK} or {@link OsConstants#RT_SCOPE_SITE}). * {@link OsConstants#RT_SCOPE_LINK} or {@link OsConstants#RT_SCOPE_SITE}). * @hide * @hide */ */ @SystemApi @TestApi public LinkAddress(InetAddress address, int prefixLength, int flags, int scope) { public LinkAddress(InetAddress address, int prefixLength, int flags, int scope) { init(address, prefixLength, flags, scope); init(address, prefixLength, flags, scope); } } Loading core/java/android/net/LinkProperties.java +10 −1 Original line number Original line Diff line number Diff line Loading @@ -174,7 +174,8 @@ public final class LinkProperties implements Parcelable { /** /** * @hide * @hide */ */ @UnsupportedAppUsage @SystemApi @TestApi public LinkProperties(LinkProperties source) { public LinkProperties(LinkProperties source) { if (source != null) { if (source != null) { mIfaceName = source.mIfaceName; mIfaceName = source.mIfaceName; Loading Loading @@ -576,6 +577,8 @@ public final class LinkProperties implements Parcelable { * @param addresses The {@link Collection} of PCSCF servers to set in this object. * @param addresses The {@link Collection} of PCSCF servers to set in this object. * @hide * @hide */ */ @SystemApi @TestApi public void setPcscfServers(Collection<InetAddress> pcscfServers) { public void setPcscfServers(Collection<InetAddress> pcscfServers) { mPcscfs.clear(); mPcscfs.clear(); for (InetAddress pcscfServer: pcscfServers) { for (InetAddress pcscfServer: pcscfServers) { Loading @@ -590,6 +593,8 @@ public final class LinkProperties implements Parcelable { * this link. * this link. * @hide * @hide */ */ @SystemApi @TestApi public List<InetAddress> getPcscfServers() { public List<InetAddress> getPcscfServers() { return Collections.unmodifiableList(mPcscfs); return Collections.unmodifiableList(mPcscfs); } } Loading Loading @@ -781,6 +786,8 @@ public final class LinkProperties implements Parcelable { * @return the NAT64 prefix. * @return the NAT64 prefix. * @hide * @hide */ */ @SystemApi @TestApi public @Nullable IpPrefix getNat64Prefix() { public @Nullable IpPrefix getNat64Prefix() { return mNat64Prefix; return mNat64Prefix; } } Loading @@ -794,6 +801,8 @@ public final class LinkProperties implements Parcelable { * @param prefix the NAT64 prefix. * @param prefix the NAT64 prefix. * @hide * @hide */ */ @SystemApi @TestApi public void setNat64Prefix(IpPrefix prefix) { public void setNat64Prefix(IpPrefix prefix) { if (prefix != null && prefix.getPrefixLength() != 96) { if (prefix != null && prefix.getPrefixLength() != 96) { throw new IllegalArgumentException("Only 96-bit prefixes are supported: " + prefix); throw new IllegalArgumentException("Only 96-bit prefixes are supported: " + prefix); Loading Loading
api/system-current.txt +26 −0 Original line number Original line Diff line number Diff line Loading @@ -3081,7 +3081,12 @@ package android.net { method public void onTetheringStarted(); method public void onTetheringStarted(); } } public final class IpPrefix implements android.os.Parcelable { ctor public IpPrefix(java.net.InetAddress, int); } public class LinkAddress implements android.os.Parcelable { public class LinkAddress implements android.os.Parcelable { ctor public LinkAddress(java.net.InetAddress, int, int, int); ctor public LinkAddress(java.net.InetAddress, int); ctor public LinkAddress(java.net.InetAddress, int); ctor public LinkAddress(String); ctor public LinkAddress(String); method public boolean isGlobalPreferred(); method public boolean isGlobalPreferred(); Loading @@ -3092,9 +3097,12 @@ package android.net { public final class LinkProperties implements android.os.Parcelable { public final class LinkProperties implements android.os.Parcelable { ctor public LinkProperties(); ctor public LinkProperties(); ctor public LinkProperties(android.net.LinkProperties); method public boolean addDnsServer(java.net.InetAddress); method public boolean addDnsServer(java.net.InetAddress); method public boolean addRoute(android.net.RouteInfo); method public boolean addRoute(android.net.RouteInfo); method public void clear(); method public void clear(); method @Nullable public android.net.IpPrefix getNat64Prefix(); method public java.util.List<java.net.InetAddress> getPcscfServers(); method public String getTcpBufferSizes(); method public String getTcpBufferSizes(); method public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers(); method public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers(); method public boolean hasGlobalIPv6Address(); method public boolean hasGlobalIPv6Address(); Loading @@ -3112,6 +3120,8 @@ package android.net { method public void setInterfaceName(String); method public void setInterfaceName(String); method public void setLinkAddresses(java.util.Collection<android.net.LinkAddress>); method public void setLinkAddresses(java.util.Collection<android.net.LinkAddress>); method public void setMtu(int); method public void setMtu(int); method public void setNat64Prefix(android.net.IpPrefix); method public void setPcscfServers(java.util.Collection<java.net.InetAddress>); method public void setPrivateDnsServerName(@Nullable String); method public void setPrivateDnsServerName(@Nullable String); method public void setTcpBufferSizes(String); method public void setTcpBufferSizes(String); method public void setUsePrivateDns(boolean); method public void setUsePrivateDns(boolean); Loading Loading @@ -3166,6 +3176,7 @@ package android.net { } } public final class RouteInfo implements android.os.Parcelable { public final class RouteInfo implements android.os.Parcelable { ctor public RouteInfo(android.net.IpPrefix, java.net.InetAddress, String, int); method public int getType(); method public int getType(); field public static final int RTN_THROW = 9; // 0x9 field public static final int RTN_THROW = 9; // 0x9 field public static final int RTN_UNICAST = 1; // 0x1 field public static final int RTN_UNICAST = 1; // 0x1 Loading Loading @@ -3299,6 +3310,7 @@ package android.net.metrics { } } public class IpConnectivityLog { public class IpConnectivityLog { ctor public IpConnectivityLog(); method public boolean log(long, android.net.metrics.IpConnectivityLog.Event); method public boolean log(long, android.net.metrics.IpConnectivityLog.Event); method public boolean log(String, android.net.metrics.IpConnectivityLog.Event); method public boolean log(String, android.net.metrics.IpConnectivityLog.Event); method public boolean log(android.net.Network, int[], android.net.metrics.IpConnectivityLog.Event); method public boolean log(android.net.Network, int[], android.net.metrics.IpConnectivityLog.Event); Loading Loading @@ -3347,6 +3359,20 @@ package android.net.metrics { field public static final int NETWORK_VALIDATION_FAILED = 3; // 0x3 field public static final int NETWORK_VALIDATION_FAILED = 3; // 0x3 } } public final class RaEvent implements android.net.metrics.IpConnectivityLog.Event { } public static class RaEvent.Builder { ctor public RaEvent.Builder(); method public android.net.metrics.RaEvent build(); method public android.net.metrics.RaEvent.Builder updateDnsslLifetime(long); method public android.net.metrics.RaEvent.Builder updatePrefixPreferredLifetime(long); method public android.net.metrics.RaEvent.Builder updatePrefixValidLifetime(long); method public android.net.metrics.RaEvent.Builder updateRdnssLifetime(long); method public android.net.metrics.RaEvent.Builder updateRouteInfoLifetime(long); method public android.net.metrics.RaEvent.Builder updateRouterLifetime(long); } public final class ValidationProbeEvent implements android.net.metrics.IpConnectivityLog.Event { public final class ValidationProbeEvent implements android.net.metrics.IpConnectivityLog.Event { method public static String getProbeName(int); method public static String getProbeName(int); field public static final int DNS_FAILURE = 0; // 0x0 field public static final int DNS_FAILURE = 0; // 0x0 Loading
api/test-current.txt +26 −0 Original line number Original line Diff line number Diff line Loading @@ -611,11 +611,16 @@ package android.net { field public static final String EXTRA_CAPTIVE_PORTAL_USER_AGENT = "android.net.extra.CAPTIVE_PORTAL_USER_AGENT"; field public static final String EXTRA_CAPTIVE_PORTAL_USER_AGENT = "android.net.extra.CAPTIVE_PORTAL_USER_AGENT"; } } public final class IpPrefix implements android.os.Parcelable { ctor public IpPrefix(java.net.InetAddress, int); } public final class IpSecManager { public final class IpSecManager { field public static final int INVALID_SECURITY_PARAMETER_INDEX = 0; // 0x0 field public static final int INVALID_SECURITY_PARAMETER_INDEX = 0; // 0x0 } } public class LinkAddress implements android.os.Parcelable { public class LinkAddress implements android.os.Parcelable { ctor public LinkAddress(java.net.InetAddress, int, int, int); method public boolean isGlobalPreferred(); method public boolean isGlobalPreferred(); method public boolean isIPv4(); method public boolean isIPv4(); method public boolean isIPv6(); method public boolean isIPv6(); Loading @@ -623,7 +628,10 @@ package android.net { } } public final class LinkProperties implements android.os.Parcelable { public final class LinkProperties implements android.os.Parcelable { ctor public LinkProperties(android.net.LinkProperties); method public boolean addDnsServer(java.net.InetAddress); method public boolean addDnsServer(java.net.InetAddress); method @Nullable public android.net.IpPrefix getNat64Prefix(); method public java.util.List<java.net.InetAddress> getPcscfServers(); method public String getTcpBufferSizes(); method public String getTcpBufferSizes(); method public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers(); method public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers(); method public boolean hasGlobalIPv6Address(); method public boolean hasGlobalIPv6Address(); Loading @@ -635,6 +643,8 @@ package android.net { method public boolean isReachable(java.net.InetAddress); method public boolean isReachable(java.net.InetAddress); method public boolean removeDnsServer(java.net.InetAddress); method public boolean removeDnsServer(java.net.InetAddress); method public boolean removeRoute(android.net.RouteInfo); method public boolean removeRoute(android.net.RouteInfo); method public void setNat64Prefix(android.net.IpPrefix); method public void setPcscfServers(java.util.Collection<java.net.InetAddress>); method public void setPrivateDnsServerName(@Nullable String); method public void setPrivateDnsServerName(@Nullable String); method public void setTcpBufferSizes(String); method public void setTcpBufferSizes(String); method public void setUsePrivateDns(boolean); method public void setUsePrivateDns(boolean); Loading @@ -652,6 +662,7 @@ package android.net { } } public final class RouteInfo implements android.os.Parcelable { public final class RouteInfo implements android.os.Parcelable { ctor public RouteInfo(android.net.IpPrefix, java.net.InetAddress, String, int); method public int getType(); method public int getType(); field public static final int RTN_THROW = 9; // 0x9 field public static final int RTN_THROW = 9; // 0x9 field public static final int RTN_UNICAST = 1; // 0x1 field public static final int RTN_UNICAST = 1; // 0x1 Loading Loading @@ -738,6 +749,7 @@ package android.net.metrics { } } public class IpConnectivityLog { public class IpConnectivityLog { ctor public IpConnectivityLog(); method public boolean log(long, android.net.metrics.IpConnectivityLog.Event); method public boolean log(long, android.net.metrics.IpConnectivityLog.Event); method public boolean log(String, android.net.metrics.IpConnectivityLog.Event); method public boolean log(String, android.net.metrics.IpConnectivityLog.Event); method public boolean log(android.net.Network, int[], android.net.metrics.IpConnectivityLog.Event); method public boolean log(android.net.Network, int[], android.net.metrics.IpConnectivityLog.Event); Loading Loading @@ -786,6 +798,20 @@ package android.net.metrics { field public static final int NETWORK_VALIDATION_FAILED = 3; // 0x3 field public static final int NETWORK_VALIDATION_FAILED = 3; // 0x3 } } public final class RaEvent implements android.net.metrics.IpConnectivityLog.Event { } public static class RaEvent.Builder { ctor public RaEvent.Builder(); method public android.net.metrics.RaEvent build(); method public android.net.metrics.RaEvent.Builder updateDnsslLifetime(long); method public android.net.metrics.RaEvent.Builder updatePrefixPreferredLifetime(long); method public android.net.metrics.RaEvent.Builder updatePrefixValidLifetime(long); method public android.net.metrics.RaEvent.Builder updateRdnssLifetime(long); method public android.net.metrics.RaEvent.Builder updateRouteInfoLifetime(long); method public android.net.metrics.RaEvent.Builder updateRouterLifetime(long); } public final class ValidationProbeEvent implements android.net.metrics.IpConnectivityLog.Event { public final class ValidationProbeEvent implements android.net.metrics.IpConnectivityLog.Event { method public static String getProbeName(int); method public static String getProbeName(int); field public static final int DNS_FAILURE = 0; // 0x0 field public static final int DNS_FAILURE = 0; // 0x0 Loading
core/java/android/net/IpPrefix.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.net; package android.net; import android.annotation.SystemApi; import android.annotation.TestApi; import android.os.Parcel; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable; import android.util.Pair; import android.util.Pair; Loading Loading @@ -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). * @param prefixLength the prefix length. Must be >= 0 and <= (32 or 128) (IPv4 or IPv6). * @hide * @hide */ */ @SystemApi @TestApi public IpPrefix(InetAddress address, int prefixLength) { public IpPrefix(InetAddress address, int prefixLength) { // We don't reuse the (byte[], int) constructor because it calls clone() on the byte array, // 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. // which is unnecessary because getAddress() already returns a clone. Loading
core/java/android/net/LinkAddress.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -162,6 +162,8 @@ public class LinkAddress implements Parcelable { * {@link OsConstants#RT_SCOPE_LINK} or {@link OsConstants#RT_SCOPE_SITE}). * {@link OsConstants#RT_SCOPE_LINK} or {@link OsConstants#RT_SCOPE_SITE}). * @hide * @hide */ */ @SystemApi @TestApi public LinkAddress(InetAddress address, int prefixLength, int flags, int scope) { public LinkAddress(InetAddress address, int prefixLength, int flags, int scope) { init(address, prefixLength, flags, scope); init(address, prefixLength, flags, scope); } } Loading
core/java/android/net/LinkProperties.java +10 −1 Original line number Original line Diff line number Diff line Loading @@ -174,7 +174,8 @@ public final class LinkProperties implements Parcelable { /** /** * @hide * @hide */ */ @UnsupportedAppUsage @SystemApi @TestApi public LinkProperties(LinkProperties source) { public LinkProperties(LinkProperties source) { if (source != null) { if (source != null) { mIfaceName = source.mIfaceName; mIfaceName = source.mIfaceName; Loading Loading @@ -576,6 +577,8 @@ public final class LinkProperties implements Parcelable { * @param addresses The {@link Collection} of PCSCF servers to set in this object. * @param addresses The {@link Collection} of PCSCF servers to set in this object. * @hide * @hide */ */ @SystemApi @TestApi public void setPcscfServers(Collection<InetAddress> pcscfServers) { public void setPcscfServers(Collection<InetAddress> pcscfServers) { mPcscfs.clear(); mPcscfs.clear(); for (InetAddress pcscfServer: pcscfServers) { for (InetAddress pcscfServer: pcscfServers) { Loading @@ -590,6 +593,8 @@ public final class LinkProperties implements Parcelable { * this link. * this link. * @hide * @hide */ */ @SystemApi @TestApi public List<InetAddress> getPcscfServers() { public List<InetAddress> getPcscfServers() { return Collections.unmodifiableList(mPcscfs); return Collections.unmodifiableList(mPcscfs); } } Loading Loading @@ -781,6 +786,8 @@ public final class LinkProperties implements Parcelable { * @return the NAT64 prefix. * @return the NAT64 prefix. * @hide * @hide */ */ @SystemApi @TestApi public @Nullable IpPrefix getNat64Prefix() { public @Nullable IpPrefix getNat64Prefix() { return mNat64Prefix; return mNat64Prefix; } } Loading @@ -794,6 +801,8 @@ public final class LinkProperties implements Parcelable { * @param prefix the NAT64 prefix. * @param prefix the NAT64 prefix. * @hide * @hide */ */ @SystemApi @TestApi public void setNat64Prefix(IpPrefix prefix) { public void setNat64Prefix(IpPrefix prefix) { if (prefix != null && prefix.getPrefixLength() != 96) { if (prefix != null && prefix.getPrefixLength() != 96) { throw new IllegalArgumentException("Only 96-bit prefixes are supported: " + prefix); throw new IllegalArgumentException("Only 96-bit prefixes are supported: " + prefix); Loading