diff options
author | Brian Carlstrom <bdc@google.com> | 2011-04-05 22:44:45 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2011-04-06 10:04:20 -0700 |
commit | 46e18c11d46a2bc1a46174f963d0ed1224d94cd2 (patch) | |
tree | 266818e339e08cea909f21b9af492f5ffc83079d /services | |
parent | 14faa3bd8bd6d1deab63a40ad2f8b6e451a16208 (diff) | |
download | frameworks_base-46e18c11d46a2bc1a46174f963d0ed1224d94cd2.zip frameworks_base-46e18c11d46a2bc1a46174f963d0ed1224d94cd2.tar.gz frameworks_base-46e18c11d46a2bc1a46174f963d0ed1224d94cd2.tar.bz2 |
Don't use local ref for cached jclass reference in JNI code
Change-Id: Id45b2acb358a819f2fd332e99f3a095f6fc7299b
related-to-bug: 4241138
Diffstat (limited to 'services')
-rw-r--r-- | services/jni/com_android_server_UsbService.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/jni/com_android_server_UsbService.cpp b/services/jni/com_android_server_UsbService.cpp index 6aeede2..00ee7e3 100644 --- a/services/jni/com_android_server_UsbService.cpp +++ b/services/jni/com_android_server_UsbService.cpp @@ -260,7 +260,7 @@ int register_android_server_UsbService(JNIEnv *env) return -1; } - clazz = env->FindClass("java/io/FileDescriptor"); + clazz = env->FindClass("java/io/FileDescriptor"); LOG_FATAL_IF(clazz == NULL, "Unable to find class java.io.FileDescriptor"); gFileDescriptorOffsets.mClass = (jclass) env->NewGlobalRef(clazz); gFileDescriptorOffsets.mConstructor = env->GetMethodID(clazz, "<init>", "()V"); @@ -268,7 +268,7 @@ int register_android_server_UsbService(JNIEnv *env) LOG_FATAL_IF(gFileDescriptorOffsets.mDescriptor == NULL, "Unable to find descriptor field in java.io.FileDescriptor"); - clazz = env->FindClass("android/os/ParcelFileDescriptor"); + clazz = env->FindClass("android/os/ParcelFileDescriptor"); LOG_FATAL_IF(clazz == NULL, "Unable to find class android.os.ParcelFileDescriptor"); gParcelFileDescriptorOffsets.mClass = (jclass) env->NewGlobalRef(clazz); gParcelFileDescriptorOffsets.mConstructor = env->GetMethodID(clazz, "<init>", "(Ljava/io/FileDescriptor;)V"); |