summaryrefslogtreecommitdiffstats
path: root/media/jni
diff options
context:
space:
mode:
authorHochi Huang <hochi.huang@mediatek.com>2014-10-24 03:17:24 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-24 03:17:24 +0000
commit35658cc42e381cba50c386464608e546c08a8b55 (patch)
tree2ca9ff57d00541563296717477dcbfa852f5e6b6 /media/jni
parentf6df7bff53d325e11233bc08fbf5a3f212723b79 (diff)
parent4a7873f19afecb01ef06b0f3dc4dde0a13a17ab3 (diff)
downloadframeworks_base-35658cc42e381cba50c386464608e546c08a8b55.zip
frameworks_base-35658cc42e381cba50c386464608e546c08a8b55.tar.gz
frameworks_base-35658cc42e381cba50c386464608e546c08a8b55.tar.bz2
am 4a7873f1: [FM]Fix FM App record fail Buganizer ID: 17975676
* commit '4a7873f19afecb01ef06b0f3dc4dde0a13a17ab3': [FM]Fix FM App record fail Buganizer ID: 17975676
Diffstat (limited to 'media/jni')
-rw-r--r--media/jni/android_media_MediaRecorder.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp
index 5646740..3b1b1d7 100644
--- a/media/jni/android_media_MediaRecorder.cpp
+++ b/media/jni/android_media_MediaRecorder.cpp
@@ -182,7 +182,8 @@ static void
android_media_MediaRecorder_setAudioSource(JNIEnv *env, jobject thiz, jint as)
{
ALOGV("setAudioSource(%d)", as);
- if (as < AUDIO_SOURCE_DEFAULT || as >= AUDIO_SOURCE_CNT) {
+ if (as < AUDIO_SOURCE_DEFAULT ||
+ (as >= AUDIO_SOURCE_CNT && as != AUDIO_SOURCE_FM_TUNER)) {
jniThrowException(env, "java/lang/IllegalArgumentException", "Invalid audio source");
return;
}