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

Commit 68e5f0f2 authored by Nathan Harold's avatar Nathan Harold Committed by Android (Google) Code Review
Browse files

Merge "[DO NOT MERGE] - Hide Tunnel Mode IpSec API" into pi-dev

parents 6b317915 0486b927
Loading
Loading
Loading
Loading
+0 −31
Original line number Diff line number Diff line
@@ -3088,37 +3088,6 @@ package android.net {
    method public void onTetheringStarted();
  }

  public final class IpSecManager {
    method public void applyTunnelModeTransform(android.net.IpSecManager.IpSecTunnelInterface, int, android.net.IpSecTransform) throws java.io.IOException;
    method public android.net.IpSecManager.IpSecTunnelInterface createIpSecTunnelInterface(java.net.InetAddress, java.net.InetAddress, android.net.Network) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException;
  }

  public static final class IpSecManager.IpSecTunnelInterface implements java.lang.AutoCloseable {
    method public void addAddress(java.net.InetAddress, int) throws java.io.IOException;
    method public void close();
    method public java.lang.String getInterfaceName();
    method public void removeAddress(java.net.InetAddress, int) throws java.io.IOException;
  }

  public final class IpSecTransform implements java.lang.AutoCloseable {
    method public void startNattKeepalive(android.net.IpSecTransform.NattKeepaliveCallback, int, android.os.Handler) throws java.io.IOException;
    method public void stopNattKeepalive();
  }

  public static class IpSecTransform.Builder {
    method public android.net.IpSecTransform buildTunnelModeTransform(java.net.InetAddress, android.net.IpSecManager.SecurityParameterIndex) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException;
  }

  public static class IpSecTransform.NattKeepaliveCallback {
    ctor public IpSecTransform.NattKeepaliveCallback();
    method public void onError(int);
    method public void onStarted();
    method public void onStopped();
    field public static final int ERROR_HARDWARE_ERROR = 3; // 0x3
    field public static final int ERROR_HARDWARE_UNSUPPORTED = 2; // 0x2
    field public static final int ERROR_INVALID_NETWORK = 1; // 0x1
  }

  public final class NetworkCapabilities implements android.os.Parcelable {
    field public static final int NET_CAPABILITY_OEM_PAID = 22; // 0x16
  }
+0 −6
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import static com.android.internal.util.Preconditions.checkNotNull;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
import android.content.Context;
@@ -666,7 +665,6 @@ public final class IpSecManager {
     * to create Network objects which are accessible to the Android system.
     * @hide
     */
    @SystemApi
    public static final class IpSecTunnelInterface implements AutoCloseable {
        private final String mOpPackageName;
        private final IIpSecService mService;
@@ -693,7 +691,6 @@ public final class IpSecManager {
         * @param prefixLen length of the InetAddress prefix
         * @hide
         */
        @SystemApi
        @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
        public void addAddress(@NonNull InetAddress address, int prefixLen) throws IOException {
            try {
@@ -713,7 +710,6 @@ public final class IpSecManager {
         * @param prefixLen length of the InetAddress prefix
         * @hide
         */
        @SystemApi
        @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
        public void removeAddress(@NonNull InetAddress address, int prefixLen) throws IOException {
            try {
@@ -809,7 +805,6 @@ public final class IpSecManager {
     * @throws ResourceUnavailableException indicating that too many encapsulation sockets are open
     * @hide
     */
    @SystemApi
    @NonNull
    @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
    public IpSecTunnelInterface createIpSecTunnelInterface(@NonNull InetAddress localAddress,
@@ -836,7 +831,6 @@ public final class IpSecManager {
     *         layer failure.
     * @hide
     */
    @SystemApi
    @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
    public void applyTunnelModeTransform(@NonNull IpSecTunnelInterface tunnel,
            @PolicyDirection int direction, @NonNull IpSecTransform transform) throws IOException {
+0 −5
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import static com.android.internal.util.Preconditions.checkNotNull;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.content.Context;
import android.os.Binder;
import android.os.Handler;
@@ -250,7 +249,6 @@ public final class IpSecTransform implements AutoCloseable {
     *
     * @hide
     */
    @SystemApi
    public static class NattKeepaliveCallback {
        /** The specified {@code Network} is not connected. */
        public static final int ERROR_INVALID_NETWORK = 1;
@@ -281,7 +279,6 @@ public final class IpSecTransform implements AutoCloseable {
     *
     * @hide
     */
    @SystemApi
    @RequiresPermission(anyOf = {
            android.Manifest.permission.MANAGE_IPSEC_TUNNELS,
            android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD
@@ -324,7 +321,6 @@ public final class IpSecTransform implements AutoCloseable {
     *
     * @hide
     */
    @SystemApi
    @RequiresPermission(anyOf = {
            android.Manifest.permission.MANAGE_IPSEC_TUNNELS,
            android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD
@@ -477,7 +473,6 @@ public final class IpSecTransform implements AutoCloseable {
         * @throws IOException indicating other errors
         * @hide
         */
        @SystemApi
        @NonNull
        @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
        public IpSecTransform buildTunnelModeTransform(