summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2015-07-08 10:18:13 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-07-08 10:18:14 +0000
commitb05c2bebf85619aaedaa39593acc53eaaed22493 (patch)
tree2a83924d642fe4ad225ef1a001476bcbbcf4918a /core/java/android
parent50d11ded0d219ea9b128557080e4ffd49ebea5ab (diff)
parent4fa438ef72d125b4c0e7eb37a6667ca51ed325e4 (diff)
Merge "Move listen() over to using android.system.Os"
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();
+ }
}
/**