From: Remi NGUYEN VAN Date: Wed, 27 Feb 2019 06:46:21 +0000 (+0900) Subject: Add Os.connect(fd, SocketAddress) to public API X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=72decd9258f18aa112727d27bb831a4add58405d;p=android-x86%2Fframeworks-base.git Add Os.connect(fd, SocketAddress) to public API 1. There are already related socket API methods that return SocketAddress, such as Os.getpeername(). 2. Having APIs that take SocketAddress are a closer match to the POSIX APIs that android.system.Os is exposing, and are more flexible than just taking InetAddress+port combinations since the latter only supports IPv4 and IPv6. This was covered by tests in change: Iadf9f10e26bbc650c5e1b9d03f32c5dafb6f21b4 And completes Ic496c1212dc2d97cf34db2a7c7d024b02790e8ed. Test: m Bug: 123062477 Change-Id: I885bfe1bf24a361bef2bb2f783622b934637ba99 --- diff --git a/api/current.txt b/api/current.txt index 172140fd653f..f547357d510e 100755 --- a/api/current.txt +++ b/api/current.txt @@ -40415,6 +40415,7 @@ package android.system { method public static void chown(String, int, int) throws android.system.ErrnoException; method public static void close(java.io.FileDescriptor) throws android.system.ErrnoException; method public static void connect(java.io.FileDescriptor, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException; + method public static void connect(java.io.FileDescriptor, java.net.SocketAddress) throws android.system.ErrnoException, java.net.SocketException; method public static java.io.FileDescriptor dup(java.io.FileDescriptor) throws android.system.ErrnoException; method public static java.io.FileDescriptor dup2(java.io.FileDescriptor, int) throws android.system.ErrnoException; method public static String[] environ();