diff options
Diffstat (limited to 'dalvik/src')
-rw-r--r-- | dalvik/src/main/java/dalvik/system/BlockGuard.java | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/dalvik/src/main/java/dalvik/system/BlockGuard.java b/dalvik/src/main/java/dalvik/system/BlockGuard.java index c45f7b1..64699ff 100644 --- a/dalvik/src/main/java/dalvik/system/BlockGuard.java +++ b/dalvik/src/main/java/dalvik/system/BlockGuard.java @@ -262,11 +262,6 @@ public final class BlockGuard { tagSocketFd(clientFd); } - public void bind(FileDescriptor aFD, InetAddress inetAddress, int port) - throws SocketException { - mNetwork.bind(aFD, inetAddress, port); - } - public int read(FileDescriptor aFD, byte[] data, int offset, int count) throws IOException { BlockGuard.getThreadPolicy().onNetwork(); return mNetwork.read(aFD, data, offset, count); @@ -289,19 +284,6 @@ public final class BlockGuard { return mNetwork.writeDirect(fd, address, offset, count); } - public boolean connect(FileDescriptor fd, InetAddress inetAddress, int port) throws IOException { - BlockGuard.getThreadPolicy().onNetwork(); - return mNetwork.connect(fd, inetAddress, port); - } - - public boolean isConnected(FileDescriptor fd, int timeout) throws IOException { - if (timeout != 0) { - // Greater than 0 is a timeout, but zero means "poll and return immediately". - BlockGuard.getThreadPolicy().onNetwork(); - } - return mNetwork.isConnected(fd, timeout); - } - public int send(FileDescriptor fd, byte[] data, int offset, int length, int port, InetAddress inetAddress) throws IOException { // Note: no BlockGuard violation. We permit datagrams @@ -328,21 +310,10 @@ public final class BlockGuard { return mNetwork.recvDirect(fd, packet, address, offset, length, peek, connected); } - public void disconnectDatagram(FileDescriptor aFD) throws SocketException { - mNetwork.disconnectDatagram(aFD); - } - public void sendUrgentData(FileDescriptor fd, byte value) { mNetwork.sendUrgentData(fd, value); } - public boolean select(FileDescriptor[] readFDs, FileDescriptor[] writeFDs, - int numReadable, int numWritable, long timeout, int[] flags) - throws SocketException { - BlockGuard.getThreadPolicy().onNetwork(); - return mNetwork.select(readFDs, writeFDs, numReadable, numWritable, timeout, flags); - } - public void close(FileDescriptor aFD) throws IOException { // We exclude sockets without SO_LINGER so that apps can close their network connections // in methods like onDestroy, which will run on the UI thread, without jumping through |