From 6d4120d4dc519ebe8190e5dc8889b79a242ba327 Mon Sep 17 00:00:00 2001 From: Yan Yan Date: Wed, 2 Feb 2022 16:39:45 -0800 Subject: [PATCH] Un-finalize IpSecManager Allows VCN and IKE unit tests to mock IpSecManager and thus stop depending on the hidden APIs in the Connectivity module (e.g. IpSecService binder interface). Otherwise, any changes on these related hidden APIs will require topic changes across multiple projects. Bug: 217572993 Test: make update-api Test: atest IpSecManagerTest, IpSecManagerTunnelTest Change-Id: I29f3ac96f83b4271f29a7051d33ccf47a0dd6c57 Merged-In: I29f3ac96f83b4271f29a7051d33ccf47a0dd6c57 --- core/api/current.txt | 2 +- core/api/module-lib-current.txt | 2 +- core/api/system-current.txt | 2 +- core/api/test-current.txt | 2 +- .../ConnectivityT/framework-t/src/android/net/IpSecManager.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/api/current.txt b/core/api/current.txt index a5b1d1f064c8e..4ba61aeab8abb 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -25252,7 +25252,7 @@ package android.net { field public static final String CRYPT_AES_CTR = "rfc3686(ctr(aes))"; } - public final class IpSecManager { + public class IpSecManager { method @NonNull public android.net.IpSecManager.SecurityParameterIndex allocateSecurityParameterIndex(@NonNull java.net.InetAddress) throws android.net.IpSecManager.ResourceUnavailableException; method @NonNull public android.net.IpSecManager.SecurityParameterIndex allocateSecurityParameterIndex(@NonNull java.net.InetAddress, int) throws android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException; method public void applyTransportModeTransform(@NonNull java.net.Socket, int, @NonNull android.net.IpSecTransform) throws java.io.IOException; diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index 1e4e787aefa3a..e66f9c0b36080 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -226,7 +226,7 @@ package android.net { field @NonNull public static final android.os.Parcelable.Creator CREATOR; } - public final class IpSecManager { + public class IpSecManager { field public static final int DIRECTION_FWD = 2; // 0x2 } diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 4480e041f52ce..c910cfc35333e 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -7054,7 +7054,7 @@ package android.net { field @NonNull public static final android.os.Parcelable.Creator CREATOR; } - public final class IpSecManager { + public class IpSecManager { method @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public void applyTunnelModeTransform(@NonNull android.net.IpSecManager.IpSecTunnelInterface, int, @NonNull android.net.IpSecTransform) throws java.io.IOException; method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public android.net.IpSecManager.IpSecTunnelInterface createIpSecTunnelInterface(@NonNull java.net.InetAddress, @NonNull java.net.InetAddress, @NonNull android.net.Network) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException; } diff --git a/core/api/test-current.txt b/core/api/test-current.txt index b531f81dc83db..ff1a058ad597c 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -1577,7 +1577,7 @@ package android.net { method public void setIncludeTestInterfaces(boolean); } - public final class IpSecManager { + public class IpSecManager { field public static final int INVALID_SECURITY_PARAMETER_INDEX = 0; // 0x0 } diff --git a/packages/ConnectivityT/framework-t/src/android/net/IpSecManager.java b/packages/ConnectivityT/framework-t/src/android/net/IpSecManager.java index a423783bc1ca3..9cb0947b2370e 100644 --- a/packages/ConnectivityT/framework-t/src/android/net/IpSecManager.java +++ b/packages/ConnectivityT/framework-t/src/android/net/IpSecManager.java @@ -61,7 +61,7 @@ import java.util.Objects; * Internet Protocol */ @SystemService(Context.IPSEC_SERVICE) -public final class IpSecManager { +public class IpSecManager { private static final String TAG = "IpSecManager"; /**