summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/net/LocalSocketImpl.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/java/android/net/LocalSocketImpl.java b/core/java/android/net/LocalSocketImpl.java
index d26e22db3923..df72da8574c1 100644
--- a/core/java/android/net/LocalSocketImpl.java
+++ b/core/java/android/net/LocalSocketImpl.java
@@ -201,8 +201,6 @@ class LocalSocketImpl
int namespace) throws IOException;
private native void bindLocal(FileDescriptor fd, String name, int namespace)
throws IOException;
- private native void listen_native(FileDescriptor fd, int backlog)
- throws IOException;
private native void shutdown(FileDescriptor fd, boolean shutdownInput);
private native Credentials getPeerCredentials_native(
FileDescriptor fd) throws IOException;
@@ -326,8 +324,11 @@ class LocalSocketImpl
if (fd == null) {
throw new IOException("socket not created");
}
-
- listen_native(fd, backlog);
+ try {
+ Os.listen(fd, backlog);
+ } catch (ErrnoException e) {
+ throw e.rethrowAsIOException();
+ }
}
/**