summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2009-12-07 18:33:53 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-12-07 18:33:53 -0800
commitfeab08b9014a049c3bcd54f4e57ca36095a75593 (patch)
tree3ddf79077c27f039ea6df41ba0a7b23d0a4c4492 /core/jni
parente204b9f84fd9924f70bd4d1e2171873ad9c42f6d (diff)
parente30bae7f8ef0489788c155ae44d9a57beca1acf5 (diff)
downloadframeworks_base-feab08b9014a049c3bcd54f4e57ca36095a75593.zip
frameworks_base-feab08b9014a049c3bcd54f4e57ca36095a75593.tar.gz
frameworks_base-feab08b9014a049c3bcd54f4e57ca36095a75593.tar.bz2
am e30bae7f: am b8341cf7: am 6d42d806: Merge change I9cc489a2 into eclair
Merge commit 'e30bae7f8ef0489788c155ae44d9a57beca1acf5' * commit 'e30bae7f8ef0489788c155ae44d9a57beca1acf5': Fix issue 2304669: VoiceIME: starting and canceling voice IME yields persistent "error 8" state on future attempts and breaks voice search.
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_media_AudioRecord.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/jni/android_media_AudioRecord.cpp b/core/jni/android_media_AudioRecord.cpp
index 0be996d..d7485ae 100644
--- a/core/jni/android_media_AudioRecord.cpp
+++ b/core/jni/android_media_AudioRecord.cpp
@@ -224,17 +224,17 @@ native_track_failure:
// ----------------------------------------------------------------------------
-static void
+static int
android_media_AudioRecord_start(JNIEnv *env, jobject thiz)
{
AudioRecord *lpRecorder =
(AudioRecord *)env->GetIntField(thiz, javaAudioRecordFields.nativeRecorderInJavaObj);
if (lpRecorder == NULL ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
- return;
+ return AUDIORECORD_ERROR;
}
- lpRecorder->start();
+ return android_media_translateRecorderErrorCode(lpRecorder->start());
}
@@ -482,7 +482,7 @@ static jint android_media_AudioRecord_get_min_buff_size(JNIEnv *env, jobject th
// ----------------------------------------------------------------------------
static JNINativeMethod gMethods[] = {
// name, signature, funcPtr
- {"native_start", "()V", (void *)android_media_AudioRecord_start},
+ {"native_start", "()I", (void *)android_media_AudioRecord_start},
{"native_stop", "()V", (void *)android_media_AudioRecord_stop},
{"native_setup", "(Ljava/lang/Object;IIIII)I",
(void *)android_media_AudioRecord_setup},