summaryrefslogtreecommitdiffstats
path: root/dalvik
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2011-05-19 13:50:09 -0700
committerElliott Hughes <enh@google.com>2011-05-19 14:41:40 -0700
commit553d98af897f7202de5e5a776287de0b5ca8fe39 (patch)
tree94168c2481a355c5e2801bdcfcbe67eb1bec68a2 /dalvik
parentae01ebf69d7d2e38eb66c40e0ebacd3b118acfc7 (diff)
downloadlibcore-553d98af897f7202de5e5a776287de0b5ca8fe39.zip
libcore-553d98af897f7202de5e5a776287de0b5ca8fe39.tar.gz
libcore-553d98af897f7202de5e5a776287de0b5ca8fe39.tar.bz2
Expose accept(2).
The implementation of PlainSocketImpl.accept is made ugly by the fact that the SocketImpl we mutate may share its FileDescriptor with a SocketChannel, so we need to mutate the FileDescriptor itself, and can't simply swap in a new one. I've raised http://b/4452981 to see if we can integrate the nio and io socket classes more closely, to avoid this kind of mess. Bug: 3107501 Change-Id: I4964b64c25e936a44d1e4c22504ca29bba247ab6
Diffstat (limited to 'dalvik')
-rw-r--r--dalvik/src/main/java/dalvik/system/BlockGuard.java19
1 files changed, 0 insertions, 19 deletions
diff --git a/dalvik/src/main/java/dalvik/system/BlockGuard.java b/dalvik/src/main/java/dalvik/system/BlockGuard.java
index c25b5be..cf9789e 100644
--- a/dalvik/src/main/java/dalvik/system/BlockGuard.java
+++ b/dalvik/src/main/java/dalvik/system/BlockGuard.java
@@ -29,7 +29,6 @@ import libcore.io.ErrnoException;
import libcore.io.Libcore;
import libcore.io.StructLinger;
import libcore.util.EmptyArray;
-import org.apache.harmony.luni.platform.INetworkSystem;
import static libcore.io.OsConstants.*;
/**
@@ -243,22 +242,4 @@ public final class BlockGuard {
}
private BlockGuard() {}
-
- /**
- * A network wrapper that calls the policy check functions.
- */
- public static class WrappedNetworkSystem implements INetworkSystem {
- private final INetworkSystem mNetwork;
-
- public WrappedNetworkSystem(INetworkSystem network) {
- mNetwork = network;
- }
-
- public void accept(FileDescriptor serverFd, SocketImpl newSocket,
- FileDescriptor clientFd) throws IOException {
- BlockGuard.getThreadPolicy().onNetwork();
- mNetwork.accept(serverFd, newSocket, clientFd);
- tagSocketFd(clientFd);
- }
- }
}