Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -25828,8 +25828,8 @@ package android.net { public static final class IpSecManager.UdpEncapsulationSocket implements java.lang.AutoCloseable { method public void close() throws java.io.IOException; method public java.io.FileDescriptor getFileDescriptor(); method public int getPort(); method public java.io.FileDescriptor getSocket(); } public final class IpSecTransform implements java.lang.AutoCloseable { core/java/android/net/IpSecManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -502,7 +502,7 @@ public final class IpSecManager { * signalling and UDP encapsulated IPsec traffic. Instances can be obtained by calling {@link * IpSecManager#openUdpEncapsulationSocket}. The provided socket cannot be re-bound by the * caller. The caller should not close the {@code FileDescriptor} returned by {@link * #getSocket}, but should use {@link #close} instead. * #getFileDescriptor}, but should use {@link #close} instead. * * <p>Allowing the user to close or unbind a UDP encapsulation socket could impact the traffic * of the next user who binds to that port. To prevent this scenario, these sockets are held Loading Loading @@ -541,8 +541,8 @@ public final class IpSecManager { mCloseGuard.open("constructor"); } /** Get the wrapped socket. */ public FileDescriptor getSocket() { /** Get the encapsulation socket's file descriptor. */ public FileDescriptor getFileDescriptor() { if (mPfd == null) { return null; } Loading services/core/java/com/android/server/IpSecService.java +1 −1 Original line number Diff line number Diff line Loading @@ -931,7 +931,7 @@ public class IpSecService extends IIpSecService.Stub { return mPort; } public FileDescriptor getSocket() { public FileDescriptor getFileDescriptor() { return mSocket; } Loading tests/net/java/android/net/IpSecManagerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ public class IpSecManagerTest { IpSecManager.UdpEncapsulationSocket encapSocket = mIpSecManager.openUdpEncapsulationSocket(TEST_UDP_ENCAP_PORT); assertNotNull(encapSocket.getSocket()); assertNotNull(encapSocket.getFileDescriptor()); assertEquals(TEST_UDP_ENCAP_PORT, encapSocket.getPort()); encapSocket.close(); Loading @@ -202,7 +202,7 @@ public class IpSecManagerTest { IpSecManager.UdpEncapsulationSocket encapSocket = mIpSecManager.openUdpEncapsulationSocket(); assertNotNull(encapSocket.getSocket()); assertNotNull(encapSocket.getFileDescriptor()); assertEquals(TEST_UDP_ENCAP_PORT, encapSocket.getPort()); encapSocket.close(); Loading Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -25828,8 +25828,8 @@ package android.net { public static final class IpSecManager.UdpEncapsulationSocket implements java.lang.AutoCloseable { method public void close() throws java.io.IOException; method public java.io.FileDescriptor getFileDescriptor(); method public int getPort(); method public java.io.FileDescriptor getSocket(); } public final class IpSecTransform implements java.lang.AutoCloseable {
core/java/android/net/IpSecManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -502,7 +502,7 @@ public final class IpSecManager { * signalling and UDP encapsulated IPsec traffic. Instances can be obtained by calling {@link * IpSecManager#openUdpEncapsulationSocket}. The provided socket cannot be re-bound by the * caller. The caller should not close the {@code FileDescriptor} returned by {@link * #getSocket}, but should use {@link #close} instead. * #getFileDescriptor}, but should use {@link #close} instead. * * <p>Allowing the user to close or unbind a UDP encapsulation socket could impact the traffic * of the next user who binds to that port. To prevent this scenario, these sockets are held Loading Loading @@ -541,8 +541,8 @@ public final class IpSecManager { mCloseGuard.open("constructor"); } /** Get the wrapped socket. */ public FileDescriptor getSocket() { /** Get the encapsulation socket's file descriptor. */ public FileDescriptor getFileDescriptor() { if (mPfd == null) { return null; } Loading
services/core/java/com/android/server/IpSecService.java +1 −1 Original line number Diff line number Diff line Loading @@ -931,7 +931,7 @@ public class IpSecService extends IIpSecService.Stub { return mPort; } public FileDescriptor getSocket() { public FileDescriptor getFileDescriptor() { return mSocket; } Loading
tests/net/java/android/net/IpSecManagerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ public class IpSecManagerTest { IpSecManager.UdpEncapsulationSocket encapSocket = mIpSecManager.openUdpEncapsulationSocket(TEST_UDP_ENCAP_PORT); assertNotNull(encapSocket.getSocket()); assertNotNull(encapSocket.getFileDescriptor()); assertEquals(TEST_UDP_ENCAP_PORT, encapSocket.getPort()); encapSocket.close(); Loading @@ -202,7 +202,7 @@ public class IpSecManagerTest { IpSecManager.UdpEncapsulationSocket encapSocket = mIpSecManager.openUdpEncapsulationSocket(); assertNotNull(encapSocket.getSocket()); assertNotNull(encapSocket.getFileDescriptor()); assertEquals(TEST_UDP_ENCAP_PORT, encapSocket.getPort()); encapSocket.close(); Loading