From 9b311c900dcc3666febf52c1bed8eae7ce1f2815 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Tue, 4 Feb 2014 15:59:39 -0800 Subject: [PATCH] Pass a thread name to AttachCurrentThread Reduces logspam from ART. Bug 12896873 Change-Id: I82ae8e2dbba3918071d9c28f5ae5c882f8dcab3a --- core/jni/android/graphics/SurfaceTexture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/jni/android/graphics/SurfaceTexture.cpp b/core/jni/android/graphics/SurfaceTexture.cpp index 311695584764..5d49204075dd 100644 --- a/core/jni/android/graphics/SurfaceTexture.cpp +++ b/core/jni/android/graphics/SurfaceTexture.cpp @@ -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) { -- 2.11.0