diff options
author | Jeff Hamilton <jham@android.com> | 2011-05-24 16:30:19 -0500 |
---|---|---|
committer | Jeff Hamilton <jham@android.com> | 2011-06-14 14:08:04 -0500 |
commit | 84f234a73bb3e149ce8c7ff768bd467fdeac27bf (patch) | |
tree | 6065125eed6a2d227eb6f76c20dc8a18dbf7e61c /jni/com_android_nfc_NativeNfcSecureElement.cpp | |
parent | f6c56a2191d58e3f9f68e3e7d94908b04b9b66ff (diff) | |
download | packages_apps_nfc-84f234a73bb3e149ce8c7ff768bd467fdeac27bf.tar.gz packages_apps_nfc-84f234a73bb3e149ce8c7ff768bd467fdeac27bf.tar.bz2 packages_apps_nfc-84f234a73bb3e149ce8c7ff768bd467fdeac27bf.zip |
Fixes from code review.
Change-Id: I147cbf71b05e6d1868bcdcd5daa0bee7e6711267
Diffstat (limited to 'jni/com_android_nfc_NativeNfcSecureElement.cpp')
-rwxr-xr-x | jni/com_android_nfc_NativeNfcSecureElement.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/jni/com_android_nfc_NativeNfcSecureElement.cpp b/jni/com_android_nfc_NativeNfcSecureElement.cpp index 56b248f..dc4d3ba 100755 --- a/jni/com_android_nfc_NativeNfcSecureElement.cpp +++ b/jni/com_android_nfc_NativeNfcSecureElement.cpp @@ -142,9 +142,7 @@ static void com_android_nfc_jni_open_secure_element_notification_callback(void * // TODO: Should use the "connected" technology, for now use the first if ((techList != NULL) && e->GetArrayLength(techList) > 0) { - jint* technologies = e->GetIntArrayElements(techList, 0); - SecureElementTech = technologies[0]; - e->ReleaseIntArrayElements(techList, technologies, JNI_ABORT); + e->GetIntArrayRegion(techList, 0, 1, &SecureElementTech); TRACE("Store Secure Element Info\n"); SecureElementInfo = psRemoteDevList->psRemoteDevInfo; @@ -157,7 +155,7 @@ static void com_android_nfc_jni_open_secure_element_notification_callback(void * // This thread may not return to the virtual machine for a long time // so make sure to delete the local refernce to the tech list. - if (techList != NULL) e->DeleteLocalRef(techList); + e->DeleteLocalRef(techList); } pContextData->status = status; |