diff options
Diffstat (limited to 'core/java/android/net/LocalSocketImpl.java')
| -rw-r--r-- | core/java/android/net/LocalSocketImpl.java | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/core/java/android/net/LocalSocketImpl.java b/core/java/android/net/LocalSocketImpl.java index fe7632c25445..b066a15106af 100644 --- a/core/java/android/net/LocalSocketImpl.java +++ b/core/java/android/net/LocalSocketImpl.java @@ -157,40 +157,6 @@ class LocalSocketImpl write_native(b, myFd); } } - - /** - * Wait until the data in sending queue is emptied. A polling version - * for flush implementation. - * @throws IOException - * if an i/o error occurs. - */ - @Override - public void flush() throws IOException { - FileDescriptor myFd = fd; - if (myFd == null) throw new IOException("socket closed"); - - // Loop until the output buffer is empty. - Int32Ref pending = new Int32Ref(0); - while (true) { - try { - // See linux/net/unix/af_unix.c - Os.ioctlInt(myFd, OsConstants.TIOCOUTQ, pending); - } catch (ErrnoException e) { - throw e.rethrowAsIOException(); - } - - if (pending.value <= 0) { - // The output buffer is empty. - break; - } - - try { - Thread.sleep(10); - } catch (InterruptedException ie) { - break; - } - } - } } private native int read_native(FileDescriptor fd) throws IOException; |
