diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-12-07 11:00:54 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-12-07 11:00:54 -0800 |
commit | 6d42d80653f2c41f3e72a878a1d9a6f9693b89f7 (patch) | |
tree | 4bd87da69a44a4f4430b4d5715aaf6a0f26c0029 /media | |
parent | 8445f367070514dce3154be73827107b8a93f234 (diff) | |
parent | 9cc489a2196e449dbe090ad9bdbc5cedd0b8334f (diff) | |
download | frameworks_base-6d42d80653f2c41f3e72a878a1d9a6f9693b89f7.zip frameworks_base-6d42d80653f2c41f3e72a878a1d9a6f9693b89f7.tar.gz frameworks_base-6d42d80653f2c41f3e72a878a1d9a6f9693b89f7.tar.bz2 |
Merge change I9cc489a2 into eclair
* changes:
Fix issue 2304669: VoiceIME: starting and canceling voice IME yields persistent "error 8" state on future attempts and breaks voice search.
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/AudioRecord.java | 7 | ||||
-rw-r--r-- | media/libmedia/AudioRecord.cpp | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java index 7a47157..c48eaad 100644 --- a/media/java/android/media/AudioRecord.java +++ b/media/java/android/media/AudioRecord.java @@ -498,8 +498,9 @@ public class AudioRecord // start recording synchronized(mRecordingStateLock) { - native_start(); - mRecordingState = RECORDSTATE_RECORDING; + if (native_start() == SUCCESS) { + mRecordingState = RECORDSTATE_RECORDING; + } } } @@ -764,7 +765,7 @@ public class AudioRecord private native final void native_release(); - private native final void native_start(); + private native final int native_start(); private native final void native_stop(); diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index c3828f0..f4165ff 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -125,7 +125,7 @@ status_t AudioRecord::set( audio_io_handle_t input = AudioSystem::getInput(inputSource, sampleRate, format, channels, (AudioSystem::audio_in_acoustics)flags); if (input == 0) { - LOGE("Could not get audio output for stream type %d", inputSource); + LOGE("Could not get audio input for record source %d", inputSource); return BAD_VALUE; } @@ -539,7 +539,6 @@ ssize_t AudioRecord::read(void* buffer, size_t userSize) return BAD_VALUE; } - LOGV("read size: %d", userSize); do { |