Added ability to set font color.
Propagating the name of meshes and allocations from native a3d to java

Change-Id: If781f55340b5369459610e5e92ea69e240dcd24e
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 888c76a..8968dfb 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -104,6 +104,17 @@
     _env->ReleasePrimitiveArrayCritical(str, cptr, JNI_ABORT);
 }
 
+static jstring
+nGetName(JNIEnv *_env, jobject _this, jint obj)
+{
+    RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
+    LOG_API("nGetName, con(%p), obj(%p)", con, (void *)obj);
+
+    const char *name = NULL;
+    rsGetName(con, (void *)obj, &name);
+    return _env->NewStringUTF(name);
+}
+
 static void
 nObjDestroy(JNIEnv *_env, jobject _this, jint obj)
 {
@@ -1518,6 +1529,7 @@
 {"nContextPause",                  "()V",                                  (void*)nContextPause },
 {"nContextResume",                 "()V",                                  (void*)nContextResume },
 {"nAssignName",                    "(I[B)V",                               (void*)nAssignName },
+{"nGetName",                       "(I)Ljava/lang/String;",               (void*)nGetName },
 {"nObjDestroy",                    "(I)V",                                 (void*)nObjDestroy },
 {"nObjDestroyOOB",                 "(I)V",                                 (void*)nObjDestroyOOB },
 {"nContextGetMessage",             "([IZ)I",                               (void*)nContextGetMessage },