diff options
author | Elliott Hughes <enh@google.com> | 2009-11-12 12:23:05 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2009-11-12 12:23:05 -0800 |
commit | 7861ea9a813b337a4abd0378584baae9cc177896 (patch) | |
tree | 88f8271cd900f3f029b4ccbfffcd15543d1a1065 /nio | |
parent | 546ebfa5b5b92b9d88c25e7db97bb0fd0261641d (diff) | |
download | libcore-7861ea9a813b337a4abd0378584baae9cc177896.zip libcore-7861ea9a813b337a4abd0378584baae9cc177896.tar.gz libcore-7861ea9a813b337a4abd0378584baae9cc177896.tar.bz2 |
Remove OSNetworkSystem.oneTimeInitialization.
Do this work at JNI registration time, as we do for almost everything else.
(I did this to rule out a warning from the dalvikvm deadlock prediction
code, which doesn't like the unusual lock ordering at initialization time,
and although it didn't make any difference to that, I prefer to have a
defined static order of initialization.)
Diffstat (limited to 'nio')
-rw-r--r-- | nio/src/main/java/java/nio/channels/DatagramChannel.java | 8 | ||||
-rw-r--r-- | nio/src/main/java/java/nio/channels/SocketChannel.java | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/nio/src/main/java/java/nio/channels/DatagramChannel.java b/nio/src/main/java/java/nio/channels/DatagramChannel.java index 31b0825..3281cf4 100644 --- a/nio/src/main/java/java/nio/channels/DatagramChannel.java +++ b/nio/src/main/java/java/nio/channels/DatagramChannel.java @@ -44,9 +44,11 @@ import org.apache.harmony.luni.platform.Platform; public abstract class DatagramChannel extends AbstractSelectableChannel implements ByteChannel, ScatteringByteChannel, GatheringByteChannel { - static { - Platform.getNetworkSystem().oneTimeInitialization(true); - } + // BEGIN android-removed: we do this statically, when we start the VM. + // static { + // Platform.getNetworkSystem().oneTimeInitialization(true); + // } + // END android-removed /** * Constructs a new {@code DatagramChannel}. diff --git a/nio/src/main/java/java/nio/channels/SocketChannel.java b/nio/src/main/java/java/nio/channels/SocketChannel.java index 40003ea..ba03a2a 100644 --- a/nio/src/main/java/java/nio/channels/SocketChannel.java +++ b/nio/src/main/java/java/nio/channels/SocketChannel.java @@ -59,9 +59,11 @@ import org.apache.harmony.luni.platform.Platform; public abstract class SocketChannel extends AbstractSelectableChannel implements ByteChannel, ScatteringByteChannel, GatheringByteChannel { - static { - Platform.getNetworkSystem().oneTimeInitialization(true); - } + // BEGIN android-removed: we do this statically, when we start the VM. + // static { + // Platform.getNetworkSystem().oneTimeInitialization(true); + // } + // END android-removed /** * Constructs a new {@code SocketChannel}. |