Fix JNI usage issues in Android TestLogParser
authorPyry Haulos <phaulos@google.com>
Fri, 24 Oct 2014 04:05:26 +0000 (21:05 -0700)
committerPyry Haulos <phaulos@google.com>
Fri, 24 Oct 2014 15:10:22 +0000 (08:10 -0700)
commit4adc1515f867b26c19c2f7498e9de93a230a234d
treef78c736d534ba7797036248cc5b3ae117c68a8d7
parentfd1df7eaea78d2c9c6bdb3da51d5f1255c479694
Fix JNI usage issues in Android TestLogParser

 * Android TestLogParser used CallObjectMethod() on Java methods returning
void, which causes CheckJNI to throw an error. Changed to use correct
CallVoidMethod().

 * TestLogListener wrapper was not freeing local jstring references,
which given large parse buffer size could easily lead to ART local
reference table overflow. Fixed by freeing all local references as soon
as the objects are passed to the Java / VM side.

Change-Id: I19811be6fdc0f3d77bc7a0d99d243529031d3b08
framework/platform/android/tcuTestLogParserJNI.cpp