Loading core/java/android/net/LocalSocketImpl.java +4 −8 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package android.net; import android.compat.annotation.UnsupportedAppUsage; import android.os.Build; import android.system.ErrnoException; import android.system.Int32Ref; import android.system.Os; import android.system.OsConstants; import android.system.StructLinger; Loading Loading @@ -65,14 +64,11 @@ class LocalSocketImpl public int available() throws IOException { FileDescriptor myFd = fd; if (myFd == null) throw new IOException("socket closed"); Int32Ref avail = new Int32Ref(0); try { Os.ioctlInt(myFd, OsConstants.FIONREAD, avail); return Os.ioctlInt(myFd, OsConstants.FIONREAD); } catch (ErrnoException e) { throw e.rethrowAsIOException(); } return avail.value; } /** {@inheritDoc} */ Loading services/core/java/com/android/server/connectivity/TcpKeepaliveController.java +4 −7 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ import android.os.Handler; import android.os.MessageQueue; import android.os.Messenger; import android.system.ErrnoException; import android.system.Int32Ref; import android.system.Os; import android.util.Log; import android.util.SparseArray; Loading Loading @@ -306,9 +305,8 @@ public class TcpKeepaliveController { private static boolean isReceiveQueueEmpty(FileDescriptor fd) throws ErrnoException { Int32Ref result = new Int32Ref(-1); Os.ioctlInt(fd, SIOCINQ, result); if (result.value != 0) { final int result = Os.ioctlInt(fd, SIOCINQ); if (result != 0) { Log.e(TAG, "Read queue has data"); return false; } Loading @@ -317,9 +315,8 @@ public class TcpKeepaliveController { private static boolean isSendQueueEmpty(FileDescriptor fd) throws ErrnoException { Int32Ref result = new Int32Ref(-1); Os.ioctlInt(fd, SIOCOUTQ, result); if (result.value != 0) { final int result = Os.ioctlInt(fd, SIOCOUTQ); if (result != 0) { Log.e(TAG, "Write queue has data"); return false; } Loading Loading
core/java/android/net/LocalSocketImpl.java +4 −8 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package android.net; import android.compat.annotation.UnsupportedAppUsage; import android.os.Build; import android.system.ErrnoException; import android.system.Int32Ref; import android.system.Os; import android.system.OsConstants; import android.system.StructLinger; Loading Loading @@ -65,14 +64,11 @@ class LocalSocketImpl public int available() throws IOException { FileDescriptor myFd = fd; if (myFd == null) throw new IOException("socket closed"); Int32Ref avail = new Int32Ref(0); try { Os.ioctlInt(myFd, OsConstants.FIONREAD, avail); return Os.ioctlInt(myFd, OsConstants.FIONREAD); } catch (ErrnoException e) { throw e.rethrowAsIOException(); } return avail.value; } /** {@inheritDoc} */ Loading
services/core/java/com/android/server/connectivity/TcpKeepaliveController.java +4 −7 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ import android.os.Handler; import android.os.MessageQueue; import android.os.Messenger; import android.system.ErrnoException; import android.system.Int32Ref; import android.system.Os; import android.util.Log; import android.util.SparseArray; Loading Loading @@ -306,9 +305,8 @@ public class TcpKeepaliveController { private static boolean isReceiveQueueEmpty(FileDescriptor fd) throws ErrnoException { Int32Ref result = new Int32Ref(-1); Os.ioctlInt(fd, SIOCINQ, result); if (result.value != 0) { final int result = Os.ioctlInt(fd, SIOCINQ); if (result != 0) { Log.e(TAG, "Read queue has data"); return false; } Loading @@ -317,9 +315,8 @@ public class TcpKeepaliveController { private static boolean isSendQueueEmpty(FileDescriptor fd) throws ErrnoException { Int32Ref result = new Int32Ref(-1); Os.ioctlInt(fd, SIOCOUTQ, result); if (result.value != 0) { final int result = Os.ioctlInt(fd, SIOCOUTQ); if (result != 0) { Log.e(TAG, "Write queue has data"); return false; } Loading