Loading core/java/android/net/LocalSocketImpl.java +10 −3 Original line number Diff line number Diff line Loading @@ -201,7 +201,6 @@ class LocalSocketImpl int namespace) throws IOException; private native void bindLocal(FileDescriptor fd, String name, int namespace) throws IOException; private native void shutdown(FileDescriptor fd, boolean shutdownInput); private native Credentials getPeerCredentials_native( FileDescriptor fd) throws IOException; Loading Loading @@ -405,7 +404,11 @@ class LocalSocketImpl throw new IOException("socket not created"); } shutdown(fd, true); try { Os.shutdown(fd, OsConstants.SHUT_RD); } catch (ErrnoException e) { throw e.rethrowAsIOException(); } } /** Loading @@ -419,7 +422,11 @@ class LocalSocketImpl throw new IOException("socket not created"); } shutdown(fd, false); try { Os.shutdown(fd, OsConstants.SHUT_WR); } catch (ErrnoException e) { throw e.rethrowAsIOException(); } } protected FileDescriptor getFileDescriptor() Loading core/jni/android_net_LocalSocketImpl.cpp +0 −24 Original line number Diff line number Diff line Loading @@ -112,29 +112,6 @@ socket_bind_local (JNIEnv *env, jobject object, jobject fileDescriptor, } } /* private native void shutdown(FileDescriptor fd, boolean shutdownInput) */ static void socket_shutdown (JNIEnv *env, jobject object, jobject fileDescriptor, jboolean shutdownInput) { int ret; int fd; fd = jniGetFDFromFileDescriptor(env, fileDescriptor); if (env->ExceptionCheck()) { return; } ret = shutdown(fd, shutdownInput ? SHUT_RD : SHUT_WR); if (ret < 0) { jniThrowIOException(env, errno); return; } } /** * Processes ancillary data, handling only * SCM_RIGHTS. Creates appropriate objects and sets appropriate Loading Loading @@ -523,7 +500,6 @@ static JNINativeMethod gMethods[] = { {"connectLocal", "(Ljava/io/FileDescriptor;Ljava/lang/String;I)V", (void*)socket_connect_local}, {"bindLocal", "(Ljava/io/FileDescriptor;Ljava/lang/String;I)V", (void*)socket_bind_local}, {"shutdown", "(Ljava/io/FileDescriptor;Z)V", (void*)socket_shutdown}, {"read_native", "(Ljava/io/FileDescriptor;)I", (void*) socket_read}, {"readba_native", "([BIILjava/io/FileDescriptor;)I", (void*) socket_readba}, {"writeba_native", "([BIILjava/io/FileDescriptor;)V", (void*) socket_writeba}, Loading Loading
core/java/android/net/LocalSocketImpl.java +10 −3 Original line number Diff line number Diff line Loading @@ -201,7 +201,6 @@ class LocalSocketImpl int namespace) throws IOException; private native void bindLocal(FileDescriptor fd, String name, int namespace) throws IOException; private native void shutdown(FileDescriptor fd, boolean shutdownInput); private native Credentials getPeerCredentials_native( FileDescriptor fd) throws IOException; Loading Loading @@ -405,7 +404,11 @@ class LocalSocketImpl throw new IOException("socket not created"); } shutdown(fd, true); try { Os.shutdown(fd, OsConstants.SHUT_RD); } catch (ErrnoException e) { throw e.rethrowAsIOException(); } } /** Loading @@ -419,7 +422,11 @@ class LocalSocketImpl throw new IOException("socket not created"); } shutdown(fd, false); try { Os.shutdown(fd, OsConstants.SHUT_WR); } catch (ErrnoException e) { throw e.rethrowAsIOException(); } } protected FileDescriptor getFileDescriptor() Loading
core/jni/android_net_LocalSocketImpl.cpp +0 −24 Original line number Diff line number Diff line Loading @@ -112,29 +112,6 @@ socket_bind_local (JNIEnv *env, jobject object, jobject fileDescriptor, } } /* private native void shutdown(FileDescriptor fd, boolean shutdownInput) */ static void socket_shutdown (JNIEnv *env, jobject object, jobject fileDescriptor, jboolean shutdownInput) { int ret; int fd; fd = jniGetFDFromFileDescriptor(env, fileDescriptor); if (env->ExceptionCheck()) { return; } ret = shutdown(fd, shutdownInput ? SHUT_RD : SHUT_WR); if (ret < 0) { jniThrowIOException(env, errno); return; } } /** * Processes ancillary data, handling only * SCM_RIGHTS. Creates appropriate objects and sets appropriate Loading Loading @@ -523,7 +500,6 @@ static JNINativeMethod gMethods[] = { {"connectLocal", "(Ljava/io/FileDescriptor;Ljava/lang/String;I)V", (void*)socket_connect_local}, {"bindLocal", "(Ljava/io/FileDescriptor;Ljava/lang/String;I)V", (void*)socket_bind_local}, {"shutdown", "(Ljava/io/FileDescriptor;Z)V", (void*)socket_shutdown}, {"read_native", "(Ljava/io/FileDescriptor;)I", (void*) socket_read}, {"readba_native", "([BIILjava/io/FileDescriptor;)I", (void*) socket_readba}, {"writeba_native", "([BIILjava/io/FileDescriptor;)V", (void*) socket_writeba}, Loading