Android-ify SocketOptions.IP_MULTICAST_IF2
SocketOptions#setOption(SocketOptions.IP_MULTICAST_IF2, value) on openJdk
expects NetworkInterface object. Pre-openJdk android expects network interface
index as an Integer. This change makes openJdk code work with both NetworkInterface object and an Integer containing network interface index.
I removed IPv4-only logic from
SocketOptions#getOption(SocketOptions.IP_MULTICAST_IF2/IP_MULTICAST_IF).
IP_MULTICAST_IF2 variant returns an Integer with NI index instead of
NetworkInterface object like in thr pre-openJdk libcore. Logic for
generating resulting InetAddress in IP_MULTICAST_IF variant was
moved from JNI to Java.
Bug: 26790580
Change-Id: I2a5c66124aef7a816f0db59bd32cd14c48d510e8
3 files changed