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

Commit d999d225 authored by Nathan Harold's avatar Nathan Harold
Browse files

Re-Expose IpSecService API Surface

Note, This reverts commit bd62d6af.

Bug: 64800246
Test: compilation
Change-Id: I709d4c476647cfe9f6b982fc373f8d76018b3922
parent b7282174
Loading
Loading
Loading
Loading
+62 −0
Original line number Original line Diff line number Diff line
@@ -8935,6 +8935,7 @@ package android.content {
    field public static final java.lang.String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
    field public static final java.lang.String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
    field public static final java.lang.String INPUT_METHOD_SERVICE = "input_method";
    field public static final java.lang.String INPUT_METHOD_SERVICE = "input_method";
    field public static final java.lang.String INPUT_SERVICE = "input";
    field public static final java.lang.String INPUT_SERVICE = "input";
    field public static final java.lang.String IPSEC_SERVICE = "ipsec";
    field public static final java.lang.String JOB_SCHEDULER_SERVICE = "jobscheduler";
    field public static final java.lang.String JOB_SCHEDULER_SERVICE = "jobscheduler";
    field public static final java.lang.String KEYGUARD_SERVICE = "keyguard";
    field public static final java.lang.String KEYGUARD_SERVICE = "keyguard";
    field public static final java.lang.String LAUNCHER_APPS_SERVICE = "launcherapps";
    field public static final java.lang.String LAUNCHER_APPS_SERVICE = "launcherapps";
@@ -25550,6 +25551,67 @@ package android.net {
    field public static final android.os.Parcelable.Creator<android.net.IpPrefix> CREATOR;
    field public static final android.os.Parcelable.Creator<android.net.IpPrefix> CREATOR;
  }
  }
  public final class IpSecAlgorithm implements android.os.Parcelable {
    ctor public IpSecAlgorithm(java.lang.String, byte[]);
    ctor public IpSecAlgorithm(java.lang.String, byte[], int);
    method public int describeContents();
    method public byte[] getKey();
    method public java.lang.String getName();
    method public int getTruncationLengthBits();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final java.lang.String AUTH_HMAC_MD5 = "hmac(md5)";
    field public static final java.lang.String AUTH_HMAC_SHA1 = "hmac(sha1)";
    field public static final java.lang.String AUTH_HMAC_SHA256 = "hmac(sha256)";
    field public static final java.lang.String AUTH_HMAC_SHA384 = "hmac(sha384)";
    field public static final java.lang.String AUTH_HMAC_SHA512 = "hmac(sha512)";
    field public static final android.os.Parcelable.Creator<android.net.IpSecAlgorithm> CREATOR;
    field public static final java.lang.String CRYPT_AES_CBC = "cbc(aes)";
  }
  public final class IpSecManager {
    method public void applyTransportModeTransform(java.io.FileDescriptor, android.net.IpSecTransform) throws java.io.IOException;
    method public android.net.IpSecManager.UdpEncapsulationSocket openUdpEncapsulationSocket(int) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException;
    method public android.net.IpSecManager.UdpEncapsulationSocket openUdpEncapsulationSocket() throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException;
    method public void removeTransportModeTransform(java.io.FileDescriptor, android.net.IpSecTransform) throws java.io.IOException;
    method public android.net.IpSecManager.SecurityParameterIndex reserveSecurityParameterIndex(int, java.net.InetAddress) throws android.net.IpSecManager.ResourceUnavailableException;
    method public android.net.IpSecManager.SecurityParameterIndex reserveSecurityParameterIndex(int, java.net.InetAddress, int) throws android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException;
    field public static final int INVALID_SECURITY_PARAMETER_INDEX = 0; // 0x0
  }
  public static final class IpSecManager.ResourceUnavailableException extends android.util.AndroidException {
  }
  public static final class IpSecManager.SecurityParameterIndex implements java.lang.AutoCloseable {
    method public void close();
    method protected void finalize();
    method public int getSpi();
  }
  public static final class IpSecManager.SpiUnavailableException extends android.util.AndroidException {
    method public int getSpi();
  }
  public static final class IpSecManager.UdpEncapsulationSocket implements java.lang.AutoCloseable {
    method public void close() throws java.io.IOException;
    method public int getPort();
    method public java.io.FileDescriptor getSocket();
  }
  public final class IpSecTransform implements java.lang.AutoCloseable {
    method public void close();
    field public static final int DIRECTION_IN = 0; // 0x0
    field public static final int DIRECTION_OUT = 1; // 0x1
  }
  public static class IpSecTransform.Builder {
    ctor public IpSecTransform.Builder(android.content.Context);
    method public android.net.IpSecTransform buildTransportModeTransform(java.net.InetAddress) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException;
    method public android.net.IpSecTransform.Builder setAuthentication(int, android.net.IpSecAlgorithm);
    method public android.net.IpSecTransform.Builder setEncryption(int, android.net.IpSecAlgorithm);
    method public android.net.IpSecTransform.Builder setIpv4Encapsulation(android.net.IpSecManager.UdpEncapsulationSocket, int);
    method public android.net.IpSecTransform.Builder setSpi(int, android.net.IpSecManager.SecurityParameterIndex);
  }
  public class LinkAddress implements android.os.Parcelable {
  public class LinkAddress implements android.os.Parcelable {
    method public int describeContents();
    method public int describeContents();
    method public java.net.InetAddress getAddress();
    method public java.net.InetAddress getAddress();
+64 −0
Original line number Original line Diff line number Diff line
@@ -9446,6 +9446,7 @@ package android.content {
    field public static final java.lang.String HDMI_CONTROL_SERVICE = "hdmi_control";
    field public static final java.lang.String HDMI_CONTROL_SERVICE = "hdmi_control";
    field public static final java.lang.String INPUT_METHOD_SERVICE = "input_method";
    field public static final java.lang.String INPUT_METHOD_SERVICE = "input_method";
    field public static final java.lang.String INPUT_SERVICE = "input";
    field public static final java.lang.String INPUT_SERVICE = "input";
    field public static final java.lang.String IPSEC_SERVICE = "ipsec";
    field public static final java.lang.String JOB_SCHEDULER_SERVICE = "jobscheduler";
    field public static final java.lang.String JOB_SCHEDULER_SERVICE = "jobscheduler";
    field public static final java.lang.String KEYGUARD_SERVICE = "keyguard";
    field public static final java.lang.String KEYGUARD_SERVICE = "keyguard";
    field public static final java.lang.String LAUNCHER_APPS_SERVICE = "launcherapps";
    field public static final java.lang.String LAUNCHER_APPS_SERVICE = "launcherapps";
@@ -27746,6 +27747,69 @@ package android.net {
    field public static final android.os.Parcelable.Creator<android.net.IpPrefix> CREATOR;
    field public static final android.os.Parcelable.Creator<android.net.IpPrefix> CREATOR;
  }
  }
  public final class IpSecAlgorithm implements android.os.Parcelable {
    ctor public IpSecAlgorithm(java.lang.String, byte[]);
    ctor public IpSecAlgorithm(java.lang.String, byte[], int);
    method public int describeContents();
    method public byte[] getKey();
    method public java.lang.String getName();
    method public int getTruncationLengthBits();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final java.lang.String AUTH_HMAC_MD5 = "hmac(md5)";
    field public static final java.lang.String AUTH_HMAC_SHA1 = "hmac(sha1)";
    field public static final java.lang.String AUTH_HMAC_SHA256 = "hmac(sha256)";
    field public static final java.lang.String AUTH_HMAC_SHA384 = "hmac(sha384)";
    field public static final java.lang.String AUTH_HMAC_SHA512 = "hmac(sha512)";
    field public static final android.os.Parcelable.Creator<android.net.IpSecAlgorithm> CREATOR;
    field public static final java.lang.String CRYPT_AES_CBC = "cbc(aes)";
  }
  public final class IpSecManager {
    method public void applyTransportModeTransform(java.io.FileDescriptor, android.net.IpSecTransform) throws java.io.IOException;
    method public android.net.IpSecManager.UdpEncapsulationSocket openUdpEncapsulationSocket(int) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException;
    method public android.net.IpSecManager.UdpEncapsulationSocket openUdpEncapsulationSocket() throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException;
    method public void removeTransportModeTransform(java.io.FileDescriptor, android.net.IpSecTransform) throws java.io.IOException;
    method public android.net.IpSecManager.SecurityParameterIndex reserveSecurityParameterIndex(int, java.net.InetAddress) throws android.net.IpSecManager.ResourceUnavailableException;
    method public android.net.IpSecManager.SecurityParameterIndex reserveSecurityParameterIndex(int, java.net.InetAddress, int) throws android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException;
    field public static final int INVALID_SECURITY_PARAMETER_INDEX = 0; // 0x0
  }
  public static final class IpSecManager.ResourceUnavailableException extends android.util.AndroidException {
  }
  public static final class IpSecManager.SecurityParameterIndex implements java.lang.AutoCloseable {
    method public void close();
    method protected void finalize();
    method public int getSpi();
  }
  public static final class IpSecManager.SpiUnavailableException extends android.util.AndroidException {
    method public int getSpi();
  }
  public static final class IpSecManager.UdpEncapsulationSocket implements java.lang.AutoCloseable {
    method public void close() throws java.io.IOException;
    method public int getPort();
    method public java.io.FileDescriptor getSocket();
  }
  public final class IpSecTransform implements java.lang.AutoCloseable {
    method public void close();
    field public static final int DIRECTION_IN = 0; // 0x0
    field public static final int DIRECTION_OUT = 1; // 0x1
  }
  public static class IpSecTransform.Builder {
    ctor public IpSecTransform.Builder(android.content.Context);
    method public android.net.IpSecTransform buildTransportModeTransform(java.net.InetAddress) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException;
    method public android.net.IpSecTransform.Builder setAuthentication(int, android.net.IpSecAlgorithm);
    method public android.net.IpSecTransform.Builder setEncryption(int, android.net.IpSecAlgorithm);
    method public android.net.IpSecTransform.Builder setIpv4Encapsulation(android.net.IpSecManager.UdpEncapsulationSocket, int);
    method public android.net.IpSecTransform.Builder setNattKeepalive(int);
    method public android.net.IpSecTransform.Builder setSpi(int, android.net.IpSecManager.SecurityParameterIndex);
    method public android.net.IpSecTransform.Builder setUnderlyingNetwork(android.net.Network);
  }
  public class LinkAddress implements android.os.Parcelable {
  public class LinkAddress implements android.os.Parcelable {
    method public int describeContents();
    method public int describeContents();
    method public java.net.InetAddress getAddress();
    method public java.net.InetAddress getAddress();
+62 −0
Original line number Original line Diff line number Diff line
@@ -8968,6 +8968,7 @@ package android.content {
    field public static final java.lang.String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
    field public static final java.lang.String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
    field public static final java.lang.String INPUT_METHOD_SERVICE = "input_method";
    field public static final java.lang.String INPUT_METHOD_SERVICE = "input_method";
    field public static final java.lang.String INPUT_SERVICE = "input";
    field public static final java.lang.String INPUT_SERVICE = "input";
    field public static final java.lang.String IPSEC_SERVICE = "ipsec";
    field public static final java.lang.String JOB_SCHEDULER_SERVICE = "jobscheduler";
    field public static final java.lang.String JOB_SCHEDULER_SERVICE = "jobscheduler";
    field public static final java.lang.String KEYGUARD_SERVICE = "keyguard";
    field public static final java.lang.String KEYGUARD_SERVICE = "keyguard";
    field public static final java.lang.String LAUNCHER_APPS_SERVICE = "launcherapps";
    field public static final java.lang.String LAUNCHER_APPS_SERVICE = "launcherapps";
@@ -25659,6 +25660,67 @@ package android.net {
    field public static final android.os.Parcelable.Creator<android.net.IpPrefix> CREATOR;
    field public static final android.os.Parcelable.Creator<android.net.IpPrefix> CREATOR;
  }
  }
  public final class IpSecAlgorithm implements android.os.Parcelable {
    ctor public IpSecAlgorithm(java.lang.String, byte[]);
    ctor public IpSecAlgorithm(java.lang.String, byte[], int);
    method public int describeContents();
    method public byte[] getKey();
    method public java.lang.String getName();
    method public int getTruncationLengthBits();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final java.lang.String AUTH_HMAC_MD5 = "hmac(md5)";
    field public static final java.lang.String AUTH_HMAC_SHA1 = "hmac(sha1)";
    field public static final java.lang.String AUTH_HMAC_SHA256 = "hmac(sha256)";
    field public static final java.lang.String AUTH_HMAC_SHA384 = "hmac(sha384)";
    field public static final java.lang.String AUTH_HMAC_SHA512 = "hmac(sha512)";
    field public static final android.os.Parcelable.Creator<android.net.IpSecAlgorithm> CREATOR;
    field public static final java.lang.String CRYPT_AES_CBC = "cbc(aes)";
  }
  public final class IpSecManager {
    method public void applyTransportModeTransform(java.io.FileDescriptor, android.net.IpSecTransform) throws java.io.IOException;
    method public android.net.IpSecManager.UdpEncapsulationSocket openUdpEncapsulationSocket(int) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException;
    method public android.net.IpSecManager.UdpEncapsulationSocket openUdpEncapsulationSocket() throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException;
    method public void removeTransportModeTransform(java.io.FileDescriptor, android.net.IpSecTransform) throws java.io.IOException;
    method public android.net.IpSecManager.SecurityParameterIndex reserveSecurityParameterIndex(int, java.net.InetAddress) throws android.net.IpSecManager.ResourceUnavailableException;
    method public android.net.IpSecManager.SecurityParameterIndex reserveSecurityParameterIndex(int, java.net.InetAddress, int) throws android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException;
    field public static final int INVALID_SECURITY_PARAMETER_INDEX = 0; // 0x0
  }
  public static final class IpSecManager.ResourceUnavailableException extends android.util.AndroidException {
  }
  public static final class IpSecManager.SecurityParameterIndex implements java.lang.AutoCloseable {
    method public void close();
    method protected void finalize();
    method public int getSpi();
  }
  public static final class IpSecManager.SpiUnavailableException extends android.util.AndroidException {
    method public int getSpi();
  }
  public static final class IpSecManager.UdpEncapsulationSocket implements java.lang.AutoCloseable {
    method public void close() throws java.io.IOException;
    method public int getPort();
    method public java.io.FileDescriptor getSocket();
  }
  public final class IpSecTransform implements java.lang.AutoCloseable {
    method public void close();
    field public static final int DIRECTION_IN = 0; // 0x0
    field public static final int DIRECTION_OUT = 1; // 0x1
  }
  public static class IpSecTransform.Builder {
    ctor public IpSecTransform.Builder(android.content.Context);
    method public android.net.IpSecTransform buildTransportModeTransform(java.net.InetAddress) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException;
    method public android.net.IpSecTransform.Builder setAuthentication(int, android.net.IpSecAlgorithm);
    method public android.net.IpSecTransform.Builder setEncryption(int, android.net.IpSecAlgorithm);
    method public android.net.IpSecTransform.Builder setIpv4Encapsulation(android.net.IpSecManager.UdpEncapsulationSocket, int);
    method public android.net.IpSecTransform.Builder setSpi(int, android.net.IpSecManager.SecurityParameterIndex);
  }
  public class LinkAddress implements android.os.Parcelable {
  public class LinkAddress implements android.os.Parcelable {
    method public int describeContents();
    method public int describeContents();
    method public java.net.InetAddress getAddress();
    method public java.net.InetAddress getAddress();
+3 −1
Original line number Original line Diff line number Diff line
@@ -2995,6 +2995,9 @@ public abstract class Context {
     *  <dt> {@link #CONNECTIVITY_SERVICE} ("connection")
     *  <dt> {@link #CONNECTIVITY_SERVICE} ("connection")
     *  <dd> A {@link android.net.ConnectivityManager ConnectivityManager} for
     *  <dd> A {@link android.net.ConnectivityManager ConnectivityManager} for
     *  handling management of network connections.
     *  handling management of network connections.
     *  <dt> {@link #IPSEC_SERVICE} ("ipsec")
     *  <dd> A {@link android.net.IpSecManager IpSecManager} for managing IPSec on
     *  sockets and networks.
     *  <dt> {@link #WIFI_SERVICE} ("wifi")
     *  <dt> {@link #WIFI_SERVICE} ("wifi")
     *  <dd> A {@link android.net.wifi.WifiManager WifiManager} for management of Wi-Fi
     *  <dd> A {@link android.net.wifi.WifiManager WifiManager} for management of Wi-Fi
     *  connectivity.  On releases before NYC, it should only be obtained from an application
     *  connectivity.  On releases before NYC, it should only be obtained from an application
@@ -3339,7 +3342,6 @@ public abstract class Context {
     * {@link android.net.IpSecManager} for encrypting Sockets or Networks with
     * {@link android.net.IpSecManager} for encrypting Sockets or Networks with
     * IPSec.
     * IPSec.
     *
     *
     * @hide
     * @see #getSystemService
     * @see #getSystemService
     */
     */
    public static final String IPSEC_SERVICE = "ipsec";
    public static final String IPSEC_SERVICE = "ipsec";
+0 −2
Original line number Original line Diff line number Diff line
@@ -28,8 +28,6 @@ import java.lang.annotation.RetentionPolicy;
/**
/**
 * IpSecAlgorithm specifies a single algorithm that can be applied to an IpSec Transform. Refer to
 * IpSecAlgorithm specifies a single algorithm that can be applied to an IpSec Transform. Refer to
 * RFC 4301.
 * RFC 4301.
 *
 * @hide
 */
 */
public final class IpSecAlgorithm implements Parcelable {
public final class IpSecAlgorithm implements Parcelable {


Loading