diff options
author | John Eckerdal <john.eckerdal@sonyericsson.com> | 2011-01-03 13:19:27 +0100 |
---|---|---|
committer | Johan Redestig <johan.redestig@sonyericsson.com> | 2011-01-03 13:19:27 +0100 |
commit | af6bc004589c456d52a8858ec8e3b448d17077bc (patch) | |
tree | f2d6e6dfbbd95642268460ea459bc7bd05d89766 | |
parent | 7390035ea61b32477243d60c452664150b61f023 (diff) | |
download | srec-af6bc004589c456d52a8858ec8e3b448d17077bc.tar.gz |
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
-rw-r--r-- | srec_jni/android_speech_srec_Recognizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/srec_jni/android_speech_srec_Recognizer.cpp b/srec_jni/android_speech_srec_Recognizer.cpp index abaf883..e0cd0f6 100644 --- a/srec_jni/android_speech_srec_Recognizer.cpp +++ b/srec_jni/android_speech_srec_Recognizer.cpp @@ -503,7 +503,7 @@ static JNIEXPORT jobjectArray JNICALL Java_android_speech_srec_Recognizer_SR_1Re } // create String[] of keys - jclass stringClass = env->FindClass("[Ljava/lang/String;"); + jclass stringClass = env->FindClass("java/lang/String"); if (!stringClass) return NULL; jobjectArray array = env->NewObjectArray(listSize, stringClass, NULL); if (!array) return NULL; |