Loading api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -4459,7 +4459,6 @@ package android.net.util { method @NonNull public static java.net.SocketAddress makeNetlinkSocketAddress(int, int); method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, int); method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, @NonNull byte[]); method public static void setSocketTimeValueOption(@NonNull java.io.FileDescriptor, int, int, long) throws android.system.ErrnoException; } } Loading api/test-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -1547,7 +1547,6 @@ package android.net.util { method @NonNull public static java.net.SocketAddress makeNetlinkSocketAddress(int, int); method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, int); method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, @NonNull byte[]); method public static void setSocketTimeValueOption(@NonNull java.io.FileDescriptor, int, int, long) throws android.system.ErrnoException; } } Loading core/java/android/net/util/SocketUtils.java +0 −9 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import android.system.ErrnoException; import android.system.NetlinkSocketAddress; import android.system.Os; import android.system.PacketSocketAddress; import android.system.StructTimeval; import libcore.io.IoBridge; Loading Loading @@ -81,14 +80,6 @@ public final class SocketUtils { return new PacketSocketAddress(ifIndex, hwAddr); } /** * Set an option on a socket that takes a time value argument. */ public static void setSocketTimeValueOption( @NonNull FileDescriptor fd, int level, int option, long millis) throws ErrnoException { Os.setsockoptTimeval(fd, level, option, StructTimeval.fromMillis(millis)); } /** * @see IoBridge#closeAndSignalBlockedThreads(FileDescriptor) */ Loading services/net/java/android/net/netlink/NetlinkSocket.java +3 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import static android.system.OsConstants.SO_SNDTIMEO; import android.net.util.SocketUtils; import android.system.ErrnoException; import android.system.Os; import android.system.StructTimeval; import android.util.Log; import java.io.FileDescriptor; Loading Loading @@ -128,7 +129,7 @@ public class NetlinkSocket { throws ErrnoException, IllegalArgumentException, InterruptedIOException { checkTimeout(timeoutMs); SocketUtils.setSocketTimeValueOption(fd, SOL_SOCKET, SO_RCVTIMEO, timeoutMs); Os.setsockoptTimeval(fd, SOL_SOCKET, SO_RCVTIMEO, StructTimeval.fromMillis(timeoutMs)); ByteBuffer byteBuffer = ByteBuffer.allocate(bufsize); int length = Os.read(fd, byteBuffer); Loading @@ -151,7 +152,7 @@ public class NetlinkSocket { FileDescriptor fd, byte[] bytes, int offset, int count, long timeoutMs) throws ErrnoException, IllegalArgumentException, InterruptedIOException { checkTimeout(timeoutMs); SocketUtils.setSocketTimeValueOption(fd, SOL_SOCKET, SO_SNDTIMEO, timeoutMs); Os.setsockoptTimeval(fd, SOL_SOCKET, SO_SNDTIMEO, StructTimeval.fromMillis(timeoutMs)); return Os.write(fd, bytes, offset, count); } } Loading
api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -4459,7 +4459,6 @@ package android.net.util { method @NonNull public static java.net.SocketAddress makeNetlinkSocketAddress(int, int); method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, int); method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, @NonNull byte[]); method public static void setSocketTimeValueOption(@NonNull java.io.FileDescriptor, int, int, long) throws android.system.ErrnoException; } } Loading
api/test-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -1547,7 +1547,6 @@ package android.net.util { method @NonNull public static java.net.SocketAddress makeNetlinkSocketAddress(int, int); method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, int); method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, @NonNull byte[]); method public static void setSocketTimeValueOption(@NonNull java.io.FileDescriptor, int, int, long) throws android.system.ErrnoException; } } Loading
core/java/android/net/util/SocketUtils.java +0 −9 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import android.system.ErrnoException; import android.system.NetlinkSocketAddress; import android.system.Os; import android.system.PacketSocketAddress; import android.system.StructTimeval; import libcore.io.IoBridge; Loading Loading @@ -81,14 +80,6 @@ public final class SocketUtils { return new PacketSocketAddress(ifIndex, hwAddr); } /** * Set an option on a socket that takes a time value argument. */ public static void setSocketTimeValueOption( @NonNull FileDescriptor fd, int level, int option, long millis) throws ErrnoException { Os.setsockoptTimeval(fd, level, option, StructTimeval.fromMillis(millis)); } /** * @see IoBridge#closeAndSignalBlockedThreads(FileDescriptor) */ Loading
services/net/java/android/net/netlink/NetlinkSocket.java +3 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import static android.system.OsConstants.SO_SNDTIMEO; import android.net.util.SocketUtils; import android.system.ErrnoException; import android.system.Os; import android.system.StructTimeval; import android.util.Log; import java.io.FileDescriptor; Loading Loading @@ -128,7 +129,7 @@ public class NetlinkSocket { throws ErrnoException, IllegalArgumentException, InterruptedIOException { checkTimeout(timeoutMs); SocketUtils.setSocketTimeValueOption(fd, SOL_SOCKET, SO_RCVTIMEO, timeoutMs); Os.setsockoptTimeval(fd, SOL_SOCKET, SO_RCVTIMEO, StructTimeval.fromMillis(timeoutMs)); ByteBuffer byteBuffer = ByteBuffer.allocate(bufsize); int length = Os.read(fd, byteBuffer); Loading @@ -151,7 +152,7 @@ public class NetlinkSocket { FileDescriptor fd, byte[] bytes, int offset, int count, long timeoutMs) throws ErrnoException, IllegalArgumentException, InterruptedIOException { checkTimeout(timeoutMs); SocketUtils.setSocketTimeValueOption(fd, SOL_SOCKET, SO_SNDTIMEO, timeoutMs); Os.setsockoptTimeval(fd, SOL_SOCKET, SO_SNDTIMEO, StructTimeval.fromMillis(timeoutMs)); return Os.write(fd, bytes, offset, count); } }