external/srec
Revision | af6bc004589c456d52a8858ec8e3b448d17077bc (tree) |
---|---|
Time | 2011-01-03 21:19:27 |
Author | John Eckerdal <john.eckerdal@sony...> |
Commiter | Johan Redestig |
Fix crash occuring when using Recognizer
The SR_RecognizerResultGetKeyList should return [Ljava/lang/String,
however the code as written before the change will actually return
[[Ljava/lang/String
This "worked" before, probably by accident, but since
dvmFindArrayClassForElement has been rewritten to no longer used a
cached arrayClass. The dvmFindArrayClassForElement actually prepends
the [ and it should not be in SR_RecognizerResultGetKeyList.
Change-Id: Ida74600f224d8a7f9906c51b1881dcb9451cc289
@@ -503,7 +503,7 @@ static JNIEXPORT jobjectArray JNICALL Java_android_speech_srec_Recognizer_SR_1Re | ||
503 | 503 | } |
504 | 504 | |
505 | 505 | // create String[] of keys |
506 | - jclass stringClass = env->FindClass("[Ljava/lang/String;"); | |
506 | + jclass stringClass = env->FindClass("java/lang/String"); | |
507 | 507 | if (!stringClass) return NULL; |
508 | 508 | jobjectArray array = env->NewObjectArray(listSize, stringClass, NULL); |
509 | 509 | if (!array) return NULL; |