OSDN Git Service

Pass a thread name to AttachCurrentThread
authorAndy McFadden <fadden@android.com>
Tue, 4 Feb 2014 23:59:39 +0000 (15:59 -0800)
committerAndy McFadden <fadden@android.com>
Tue, 4 Feb 2014 23:59:39 +0000 (15:59 -0800)
Reduces logspam from ART.

Bug 12896873

Change-Id: I82ae8e2dbba3918071d9c28f5ae5c882f8dcab3a

core/jni/android/graphics/SurfaceTexture.cpp

index 3116955..5d49204 100644 (file)
@@ -141,7 +141,8 @@ JNIEnv* JNISurfaceTextureContext::getJNIEnv(bool* needsDetach) {
     *needsDetach = false;
     JNIEnv* env = AndroidRuntime::getJNIEnv();
     if (env == NULL) {
-        JavaVMAttachArgs args = {JNI_VERSION_1_4, NULL, NULL};
+        JavaVMAttachArgs args = {
+            JNI_VERSION_1_4, "JNISurfaceTextureContext", NULL };
         JavaVM* vm = AndroidRuntime::getJavaVM();
         int result = vm->AttachCurrentThread(&env, (void*) &args);
         if (result != JNI_OK) {