Remove dead native org.apache.harmony.nio.AddressUtils code.

This code is dead at the moment, and were it ever to become live, I'm pretty
sure we'd want to start again from scratch rather than do whatever the author
of this had in mind.
diff --git a/libcore/nio/src/main/java/org/apache/harmony/nio/AddressUtil.java b/libcore/nio/src/main/java/org/apache/harmony/nio/AddressUtil.java
index 315fe57..d39b1ea 100644
--- a/libcore/nio/src/main/java/org/apache/harmony/nio/AddressUtil.java
+++ b/libcore/nio/src/main/java/org/apache/harmony/nio/AddressUtil.java
@@ -58,33 +58,8 @@
         return ((DirectBuffer) buf).getEffectiveAddress().toInt();
     }
 
-    /**
-     * Gets the address of native resource held by the given channel, if it has
-     * any.
-     * 
-     * For network related channel, including {@link SocketChannel},
-     * {@link ServerSocketChannel} and {@link DatagramChannel}, this method
-     * returns the Socket handle (long) in Linux, and returns a SOCKET
-     * (UINT_PTR) in windows.
-     * 
-     * For {@link FileChannel}, this method returns the native file descriptor.
-     * 
-     * For other channels, this method return 0, which means unsupported
-     * operation.
-     * 
-     * @param channel
-     *            the given channel which may holds a native resource address
-     * @return the address of native resource held by the given channel, if any,
-     *         otherwise return 0
-     */
-    public static int getChannelAddress(Channel channel){
-        if (channel instanceof FileDescriptorHandler) {
-            return getFDAddress(((FileDescriptorHandler) channel).getFD());
-        } else if (channel instanceof FileChannelImpl) {
-            return ((FileChannelImpl) channel).getHandle();
-        }
-        return 0;
-    }
-
-    private static native int getFDAddress(FileDescriptor fd);
-}
\ No newline at end of file
+    // BEGIN android-removed: dead code (the native side of which was scary!)
+    //public static int getChannelAddress(Channel channel);
+    //private static native int getFDAddress(FileDescriptor fd);
+    // END android-removed
+}
diff --git a/libcore/nio/src/main/native/org_apache_harmony_nio_AddressUtil.cpp b/libcore/nio/src/main/native/org_apache_harmony_nio_AddressUtil.cpp
deleted file mode 100644
index cb665de..0000000
--- a/libcore/nio/src/main/native/org_apache_harmony_nio_AddressUtil.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "JNIHelp.h"
-#include "AndroidSystemNatives.h"
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#define SOCKET_CAST(x) ((struct hysocket_struct*)  x)->sock
-
-typedef jint OSSOCKET; 
-
-typedef struct hysocket_struct
-{
-    OSSOCKET sock;
-    unsigned short family;
-} hysocket_struct;
-
-typedef struct hysocket_struct *hysocket_t;
-
-/*
- * Internal helper function.
- *
- * Get the file descriptor.
- */
-static jint getFd(JNIEnv* env, jclass clazz, jobject fd)
-{
-    jclass descriptorCLS;
-    jfieldID descriptorFID;
-    hysocket_t* hysocketP;
-
-    descriptorCLS = env->FindClass("java/io/FileDescriptor");
-    if (NULL == descriptorCLS){
-        return 0;
-    }
-    descriptorFID = env->GetFieldID(descriptorCLS, "descriptor", "I");
-    if (NULL == descriptorFID){
-        return 0;
-    }
-    jint result = env->GetIntField(fd, descriptorFID);
-    hysocketP = (hysocket_t*) (result);
-    return SOCKET_CAST(hysocketP);
-}
-
-/*
- * JNI registration
- */
-static JNINativeMethod gMethods[] = {
-    /* name, signature, funcPtr */
-    { "getFDAddress", "(Ljava/io/FileDescriptor;)I", (void*) getFd }
-};
-
-int register_org_apache_harmony_nio_AddressUtil(JNIEnv* env)
-{
-    return jniRegisterNativeMethods(env, "org/apache/harmony/nio/AddressUtil",
-        gMethods, NELEM(gMethods));
-}
diff --git a/libcore/nio/src/main/native/sub.mk b/libcore/nio/src/main/native/sub.mk
deleted file mode 100644
index 750d216..0000000
--- a/libcore/nio/src/main/native/sub.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-# This file is included by the top-level libcore Android.mk.
-# It's not a normal makefile, so we don't include CLEAR_VARS
-# or BUILD_*_LIBRARY.
-
-LOCAL_SRC_FILES := \
-	org_apache_harmony_nio_AddressUtil.cpp
-
-LOCAL_C_INCLUDES +=
-
-# Any shared/static libs that are listed here must also
-# be listed in libs/nativehelper/Android.mk.
-# TODO: fix this requirement
-
-LOCAL_SHARED_LIBRARIES +=
-
-LOCAL_STATIC_LIBRARIES +=
diff --git a/libnativehelper/Register.c b/libnativehelper/Register.c
index b77cc13..7427972 100644
--- a/libnativehelper/Register.c
+++ b/libnativehelper/Register.c
@@ -52,8 +52,6 @@
         goto bail;
     if (register_org_apache_harmony_luni_platform_OSNetworkSystem(env) != 0)
         goto bail;
-    if (register_org_apache_harmony_nio_AddressUtil(env) != 0)
-        goto bail;
     if (register_org_apache_harmony_luni_util_fltparse(env) != 0)
         goto bail;
     if (register_org_apache_harmony_luni_util_NumberConvert(env) != 0)
@@ -132,4 +130,3 @@
     (*env)->PopLocalFrame(env, NULL);
     return result;
 }
-
diff --git a/libnativehelper/include/nativehelper/AndroidSystemNatives.h b/libnativehelper/include/nativehelper/AndroidSystemNatives.h
index 46e2bf2..800c015 100644
--- a/libnativehelper/include/nativehelper/AndroidSystemNatives.h
+++ b/libnativehelper/include/nativehelper/AndroidSystemNatives.h
@@ -59,7 +59,6 @@
 int register_org_apache_harmony_luni_platform_OSFileSystem(JNIEnv* env);
 int register_org_apache_harmony_luni_platform_OSMemory(JNIEnv* env);
 int register_org_apache_harmony_luni_platform_OSNetworkSystem(JNIEnv* env);
-int register_org_apache_harmony_nio_AddressUtil(JNIEnv* env);
 int register_org_apache_harmony_text_BidiWrapper(JNIEnv *env);
 
 int register_org_apache_harmony_xnet_provider_jsse_OpenSSLServerSocketImpl(JNIEnv *env);