Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aee43d23 authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN Committed by android-build-merger
Browse files

Merge "Add additional SystemApi for NetworkStack"

am: 2ffdcc26

Change-Id: I2614b1484498ad9d285be5f6628a94983f1561e4
parents 5419f983 2ffdcc26
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -3081,7 +3081,12 @@ package android.net {
    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 {
    ctor public LinkAddress(java.net.InetAddress, int, int, int);
    ctor public LinkAddress(java.net.InetAddress, int);
    ctor public LinkAddress(String);
    method public boolean isGlobalPreferred();
@@ -3092,9 +3097,12 @@ package android.net {
  public final class LinkProperties implements android.os.Parcelable {
    ctor public LinkProperties();
    ctor public LinkProperties(android.net.LinkProperties);
    method public boolean addDnsServer(java.net.InetAddress);
    method public boolean addRoute(android.net.RouteInfo);
    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 java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers();
    method public boolean hasGlobalIPv6Address();
@@ -3112,6 +3120,8 @@ package android.net {
    method public void setInterfaceName(String);
    method public void setLinkAddresses(java.util.Collection<android.net.LinkAddress>);
    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 setTcpBufferSizes(String);
    method public void setUsePrivateDns(boolean);
@@ -3166,6 +3176,7 @@ package android.net {
  }
  public final class RouteInfo implements android.os.Parcelable {
    ctor public RouteInfo(android.net.IpPrefix, java.net.InetAddress, String, int);
    method public int getType();
    field public static final int RTN_THROW = 9; // 0x9
    field public static final int RTN_UNICAST = 1; // 0x1
@@ -3299,6 +3310,7 @@ package android.net.metrics {
  }
  public class IpConnectivityLog {
    ctor public IpConnectivityLog();
    method public boolean log(long, 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);
@@ -3347,6 +3359,20 @@ package android.net.metrics {
    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 {
    method public static String getProbeName(int);
    field public static final int DNS_FAILURE = 0; // 0x0
+26 −0
Original line number Diff line number Diff line
@@ -611,11 +611,16 @@ package android.net {
    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 {
    field public static final int INVALID_SECURITY_PARAMETER_INDEX = 0; // 0x0
  }

  public class LinkAddress implements android.os.Parcelable {
    ctor public LinkAddress(java.net.InetAddress, int, int, int);
    method public boolean isGlobalPreferred();
    method public boolean isIPv4();
    method public boolean isIPv6();
@@ -623,7 +628,10 @@ package android.net {
  }

  public final class LinkProperties implements android.os.Parcelable {
    ctor public LinkProperties(android.net.LinkProperties);
    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 java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers();
    method public boolean hasGlobalIPv6Address();
@@ -635,6 +643,8 @@ package android.net {
    method public boolean isReachable(java.net.InetAddress);
    method public boolean removeDnsServer(java.net.InetAddress);
    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 setTcpBufferSizes(String);
    method public void setUsePrivateDns(boolean);
@@ -652,6 +662,7 @@ package android.net {
  }

  public final class RouteInfo implements android.os.Parcelable {
    ctor public RouteInfo(android.net.IpPrefix, java.net.InetAddress, String, int);
    method public int getType();
    field public static final int RTN_THROW = 9; // 0x9
    field public static final int RTN_UNICAST = 1; // 0x1
@@ -738,6 +749,7 @@ package android.net.metrics {
  }

  public class IpConnectivityLog {
    ctor public IpConnectivityLog();
    method public boolean log(long, 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);
@@ -786,6 +798,20 @@ package android.net.metrics {
    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 {
    method public static String getProbeName(int);
    field public static final int DNS_FAILURE = 0; // 0x0
+4 −0
Original line number Diff line number Diff line
@@ -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 &gt;= 0 and &lt;= (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.
+2 −0
Original line number Diff line number Diff line
@@ -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);
    }
+10 −1
Original line number Diff line number Diff line
@@ -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<InetAddress> pcscfServers) {
        mPcscfs.clear();
        for (InetAddress pcscfServer: pcscfServers) {
@@ -590,6 +593,8 @@ public final class LinkProperties implements Parcelable {
     *         this link.
     * @hide
     */
    @SystemApi
    @TestApi
    public List<InetAddress> 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);
Loading