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

Commit 79a6d5e3 authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN Committed by Gerrit Code Review
Browse files

Merge "Add fields used by NetworkStack to the API"

parents b4a450a1 31f1d0cd
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -27553,6 +27553,7 @@ package android.net {
    method public android.net.IpPrefix getDestination();
    method public android.net.IpPrefix getDestination();
    method public java.net.InetAddress getGateway();
    method public java.net.InetAddress getGateway();
    method public String getInterface();
    method public String getInterface();
    method public boolean hasGateway();
    method public boolean isDefaultRoute();
    method public boolean isDefaultRoute();
    method public boolean matches(java.net.InetAddress);
    method public boolean matches(java.net.InetAddress);
    method public void writeToParcel(android.os.Parcel, int);
    method public void writeToParcel(android.os.Parcel, int);
+15 −0
Original line number Original line Diff line number Diff line
@@ -3044,6 +3044,10 @@ package android.net {
  public class LinkAddress implements android.os.Parcelable {
  public class LinkAddress implements android.os.Parcelable {
    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 isIPv4();
    method public boolean isIPv6();
    method public boolean isSameAddressAs(android.net.LinkAddress);
  }
  }


  public final class LinkProperties implements android.os.Parcelable {
  public final class LinkProperties implements android.os.Parcelable {
@@ -3058,6 +3062,10 @@ package android.net {
    method public void setMtu(int);
    method public void setMtu(int);
  }
  }


  public class Network implements android.os.Parcelable {
    method public android.net.Network getPrivateDnsBypassingCopy();
  }

  public final class NetworkCapabilities implements android.os.Parcelable {
  public final class NetworkCapabilities implements android.os.Parcelable {
    method public int getSignalStrength();
    method public int getSignalStrength();
    field public static final int NET_CAPABILITY_OEM_PAID = 22; // 0x16
    field public static final int NET_CAPABILITY_OEM_PAID = 22; // 0x16
@@ -3099,6 +3107,13 @@ package android.net {
    field public static final String EXTRA_PACKAGE_NAME = "packageName";
    field public static final String EXTRA_PACKAGE_NAME = "packageName";
  }
  }


  public final class RouteInfo implements android.os.Parcelable {
    method public int getType();
    field public static final int RTN_THROW = 9; // 0x9
    field public static final int RTN_UNICAST = 1; // 0x1
    field public static final int RTN_UNREACHABLE = 7; // 0x7
  }

  public class RssiCurve implements android.os.Parcelable {
  public class RssiCurve implements android.os.Parcelable {
    ctor public RssiCurve(int, int, byte[]);
    ctor public RssiCurve(int, int, byte[]);
    ctor public RssiCurve(int, int, byte[], int);
    ctor public RssiCurve(int, int, byte[], int);
+18 −0
Original line number Original line Diff line number Diff line
@@ -602,11 +602,29 @@ package android.net {
    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 {
    method public boolean isGlobalPreferred();
    method public boolean isIPv4();
    method public boolean isIPv6();
    method public boolean isSameAddressAs(android.net.LinkAddress);
  }

  public class Network implements android.os.Parcelable {
    method public android.net.Network getPrivateDnsBypassingCopy();
  }

  public final class NetworkCapabilities implements android.os.Parcelable {
  public final class NetworkCapabilities implements android.os.Parcelable {
    method public int[] getCapabilities();
    method public int[] getCapabilities();
    method public int[] getTransportTypes();
    method public int[] getTransportTypes();
  }
  }


  public final class RouteInfo implements android.os.Parcelable {
    method public int getType();
    field public static final int RTN_THROW = 9; // 0x9
    field public static final int RTN_UNICAST = 1; // 0x1
    field public static final int RTN_UNREACHABLE = 7; // 0x7
  }

  public class TrafficStats {
  public class TrafficStats {
    method public static long getLoopbackRxBytes();
    method public static long getLoopbackRxBytes();
    method public static long getLoopbackRxPackets();
    method public static long getLoopbackRxPackets();
+9 −2
Original line number Original line Diff line number Diff line
@@ -26,6 +26,7 @@ import static android.system.OsConstants.RT_SCOPE_SITE;
import static android.system.OsConstants.RT_SCOPE_UNIVERSE;
import static android.system.OsConstants.RT_SCOPE_UNIVERSE;


import android.annotation.SystemApi;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
import android.annotation.UnsupportedAppUsage;
import android.os.Build;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcel;
@@ -117,7 +118,8 @@ public class LinkAddress implements Parcelable {
     * @return true if the address is IPv6.
     * @return true if the address is IPv6.
     * @hide
     * @hide
     */
     */
    @UnsupportedAppUsage
    @TestApi
    @SystemApi
    public boolean isIPv6() {
    public boolean isIPv6() {
        return address instanceof Inet6Address;
        return address instanceof Inet6Address;
    }
    }
@@ -126,6 +128,8 @@ public class LinkAddress implements Parcelable {
     * @return true if the address is IPv4 or is a mapped IPv4 address.
     * @return true if the address is IPv4 or is a mapped IPv4 address.
     * @hide
     * @hide
     */
     */
    @TestApi
    @SystemApi
    public boolean isIPv4() {
    public boolean isIPv4() {
        return address instanceof Inet4Address;
        return address instanceof Inet4Address;
    }
    }
@@ -263,7 +267,8 @@ public class LinkAddress implements Parcelable {
     * otherwise.
     * otherwise.
     * @hide
     * @hide
     */
     */
    @UnsupportedAppUsage
    @TestApi
    @SystemApi
    public boolean isSameAddressAs(LinkAddress other) {
    public boolean isSameAddressAs(LinkAddress other) {
        return address.equals(other.address) && prefixLength == other.prefixLength;
        return address.equals(other.address) && prefixLength == other.prefixLength;
    }
    }
@@ -310,6 +315,8 @@ public class LinkAddress implements Parcelable {
     * Returns true if this {@code LinkAddress} is global scope and preferred.
     * Returns true if this {@code LinkAddress} is global scope and preferred.
     * @hide
     * @hide
     */
     */
    @TestApi
    @SystemApi
    public boolean isGlobalPreferred() {
    public boolean isGlobalPreferred() {
        /**
        /**
         * Note that addresses flagged as IFA_F_OPTIMISTIC are
         * Note that addresses flagged as IFA_F_OPTIMISTIC are
+2 −0
Original line number Original line Diff line number Diff line
@@ -52,6 +52,8 @@ public final class MacAddress implements Parcelable {


    /**
    /**
     * The MacAddress zero MAC address.
     * The MacAddress zero MAC address.
     *
     * <p>Not publicly exposed or treated specially since the OUI 00:00:00 is registered.
     * @hide
     * @hide
     */
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage
Loading