diff --git a/api/system-current.txt b/api/system-current.txt index 29a328a48b9e0..878749f4659c5 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -2611,8 +2611,10 @@ package android.net { } public static final class IpSecManager.IpSecTunnelInterface implements java.lang.AutoCloseable { + method public void addAddress(android.net.LinkAddress) throws java.io.IOException; method public void close(); method public java.lang.String getInterfaceName(); + method public void removeAddress(android.net.LinkAddress) throws java.io.IOException; } public final class IpSecTransform implements java.lang.AutoCloseable { diff --git a/core/java/android/net/IpSecManager.java b/core/java/android/net/IpSecManager.java index 4e1f83430abf9..cb4299ef69874 100644 --- a/core/java/android/net/IpSecManager.java +++ b/core/java/android/net/IpSecManager.java @@ -658,7 +658,8 @@ public final class IpSecManager { * @param address the local address for traffic inside the tunnel * @hide */ - public void addAddress(LinkAddress address) { + @SystemApi + public void addAddress(LinkAddress address) throws IOException { try { mService.addAddressToTunnelInterface(mResourceId, address); } catch (RemoteException e) { @@ -674,7 +675,8 @@ public final class IpSecManager { * @param address to be removed * @hide */ - public void removeAddress(LinkAddress address) { + @SystemApi + public void removeAddress(LinkAddress address) throws IOException { try { mService.removeAddressFromTunnelInterface(mResourceId, address); } catch (RemoteException e) {