Merge "Merge "MediaPlayer: ensure that jni code returns after throwing exceptions." into pi-dev am: 1a9def3dc7" into pi-dev-plus-aosp

This commit is contained in:
Android Build Merger (Role)
2018-05-24 18:50:26 +00:00
committed by Android (Google) Code Review
2 changed files with 18 additions and 0 deletions

View File

@@ -384,6 +384,9 @@ android_media_MediaPlayer_getBufferingParams(JNIEnv *env, jobject thiz)
process_media_player_call(
env, thiz, mp->getBufferingSettings(&settings),
"java/lang/IllegalStateException", "unexpected error");
if (env->ExceptionCheck()) {
return nullptr;
}
ALOGV("getBufferingSettings:{%s}", settings.toString().string());
return bp.asJobject(env, gBufferingParamsFields);
@@ -555,6 +558,9 @@ android_media_MediaPlayer_getPlaybackParams(JNIEnv *env, jobject thiz)
process_media_player_call(
env, thiz, mp->getPlaybackSettings(&audioRate),
"java/lang/IllegalStateException", "unexpected error");
if (env->ExceptionCheck()) {
return nullptr;
}
ALOGV("getPlaybackSettings: %f %f %d %d",
audioRate.mSpeed, audioRate.mPitch, audioRate.mFallbackMode, audioRate.mStretchMode);
@@ -623,6 +629,9 @@ android_media_MediaPlayer_getSyncParams(JNIEnv *env, jobject thiz)
process_media_player_call(
env, thiz, mp->getSyncSettings(&scp.sync, &scp.frameRate),
"java/lang/IllegalStateException", "unexpected error");
if (env->ExceptionCheck()) {
return nullptr;
}
ALOGV("getSyncSettings: %d %d %f %f",
scp.sync.mSource, scp.sync.mAudioAdjustMode, scp.sync.mTolerance, scp.frameRate);

View File

@@ -495,6 +495,9 @@ android_media_MediaPlayer2_getBufferingParams(JNIEnv *env, jobject thiz)
process_media_player_call(
env, thiz, mp->getBufferingSettings(&settings),
"java/lang/IllegalStateException", "unexpected error");
if (env->ExceptionCheck()) {
return nullptr;
}
ALOGV("getBufferingSettings:{%s}", settings.toString().string());
return bp.asJobject(env, gBufferingParamsFields);
@@ -662,6 +665,9 @@ android_media_MediaPlayer2_getPlaybackParams(JNIEnv *env, jobject thiz)
process_media_player_call(
env, thiz, mp->getPlaybackSettings(&audioRate),
"java/lang/IllegalStateException", "unexpected error");
if (env->ExceptionCheck()) {
return nullptr;
}
ALOGV("getPlaybackSettings: %f %f %d %d",
audioRate.mSpeed, audioRate.mPitch, audioRate.mFallbackMode, audioRate.mStretchMode);
@@ -730,6 +736,9 @@ android_media_MediaPlayer2_getSyncParams(JNIEnv *env, jobject thiz)
process_media_player_call(
env, thiz, mp->getSyncSettings(&scp.sync, &scp.frameRate),
"java/lang/IllegalStateException", "unexpected error");
if (env->ExceptionCheck()) {
return nullptr;
}
ALOGV("getSyncSettings: %d %d %f %f",
scp.sync.mSource, scp.sync.mAudioAdjustMode, scp.sync.mTolerance, scp.frameRate);