summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2019-01-24 20:38:28 +0900
committerRemi NGUYEN VAN <reminv@google.com>2019-01-28 17:18:55 +0900
commitcb1f1f578e498d68854737938b48b568af7a9048 (patch)
treeb253ec180bc432721b0eb5076cb38a95134d796f /annotations/generate_annotated_java_files.py
parentf10072704b7efcf352e874dc316c249a609bacd6 (diff)
Mark Os.bind, Os.sendTo as 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. 3. Given that InetSocketAddress is a subclass of SocketAddress, there is very little additional implementation burden to supporting both SocketAddress versions and InetSocketAddress versions - basically just ensure that any EINVAL or EAFNOSUPPORT error messages coming from the kernel are properly returned. Arguably, it might have been better to expose only the SocketAddress variants from the beginning, but obviously now that we have the InetAddress+port variants we need to support those too. Test: m Bug: 123062477 Change-Id: I2c3d9e42004cebd4c38754bfb4b65cf6a2a56959
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions