JNI: NewDirectByteBuffer should allow 0 length buffers.

This makes the implementation symmetric with direct
buffers allocated from java.

- GetDirectBufferAddress returns the address of the buffer
  passed in to NewDirectByteBuffer (and not NULL).
- GetDirectBufferCapaticy returns 0.

bug: https://code.google.com/p/android/issues/detail?id=63055
Change-Id: I55b24623ec4f7670972fed898ea097934c6c0b5f
diff --git a/test/JniTest/JniTest.java b/test/JniTest/JniTest.java
index 9194da5..d53cf5e 100644
--- a/test/JniTest/JniTest.java
+++ b/test/JniTest/JniTest.java
@@ -23,6 +23,7 @@
         testFindFieldOnAttachedNativeThread();
         testCallStaticVoidMethodOnSubClass();
         testGetMirandaMethod();
+        testZeroLengthByteBuffers();
     }
 
     private static native void testFindClassOnAttachedNativeThread();
@@ -67,6 +68,8 @@
         }
     }
 
+    private static native void testZeroLengthByteBuffers();
+
     private static abstract class testGetMirandaMethod_MirandaAbstract implements testGetMirandaMethod_MirandaInterface {
         public boolean inAbstract() {
             return true;