Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a2bda18 authored by Vlad Popa's avatar Vlad Popa Committed by Android (Google) Code Review
Browse files

Merge "Fix exception checking after native prepare call" into udc-dev

parents d8c71e5d 33ae2f6d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -385,6 +385,10 @@ android_media_MediaPlayer_prepare(JNIEnv *env, jobject thiz, jobject piidParcel)

    process_media_player_call( env, thiz, mp->prepare(), "java/io/IOException", "Prepare failed." );

    if (env->ExceptionCheck()) {
        return UNKNOWN_ERROR;
    }

    // update the piid
    Parcel *request = parcelForJavaObject(env, piidParcel);
    auto reply = std::make_unique<Parcel>();
@@ -407,6 +411,10 @@ android_media_MediaPlayer_prepareAsync(JNIEnv *env, jobject thiz, jobject piidPa

    process_media_player_call( env, thiz, mp->prepareAsync(), "java/io/IOException", "Prepare Async failed." );

    if (env->ExceptionCheck()) {
        return UNKNOWN_ERROR;
    }

    // update the piid
    Parcel *request = parcelForJavaObject(env, piidParcel);
    auto reply = std::make_unique<Parcel>();