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/runtime/check_jni.cc b/runtime/check_jni.cc
index a84e18a..09c48b1 100644
--- a/runtime/check_jni.cc
+++ b/runtime/check_jni.cc
@@ -1754,8 +1754,8 @@
     if (address == NULL) {
       JniAbortF(__FUNCTION__, "non-nullable address is NULL");
     }
-    if (capacity <= 0) {
-      JniAbortF(__FUNCTION__, "capacity must be greater than 0: %lld", capacity);
+    if (capacity < 0) {
+      JniAbortF(__FUNCTION__, "capacity must be non negative: %lld", capacity);
     }
     return CHECK_JNI_EXIT("L", baseEnv(env)->NewDirectByteBuffer(env, address, capacity));
   }