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

Commit 2fd8d5e5 authored by Dorin Drimus's avatar Dorin Drimus Committed by Automerger Merge Worker
Browse files

Merge "Use local status for convert profile" am: 7aab6bbe am: b9b3f78f am:...

Merge "Use local status for convert profile" am: 7aab6bbe am: b9b3f78f am: 1e239a8a am: 44e565c2

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2218683



Change-Id: I1569df3d5c365a1c59f2776163d6ba3e125afd2a
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a0fe064c 44e565c2
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2937,13 +2937,14 @@ static jint android_media_AudioSystem_getDirectProfilesForAttributes(JNIEnv *env

    for (const auto &audioProfile : audioProfiles) {
        jobject jAudioProfile;
        jStatus = convertAudioProfileFromNative(env, &jAudioProfile, &audioProfile, false);
        if (jStatus == AUDIO_JAVA_BAD_VALUE) {
        jint jConvertProfileStatus = convertAudioProfileFromNative(
                                        env, &jAudioProfile, &audioProfile, false);
        if (jConvertProfileStatus == AUDIO_JAVA_BAD_VALUE) {
            // skipping Java layer unsupported audio formats
            continue;
        }
        if (jStatus != AUDIO_JAVA_SUCCESS) {
            return jStatus;
        if (jConvertProfileStatus != AUDIO_JAVA_SUCCESS) {
            return jConvertProfileStatus;
        }
        env->CallBooleanMethod(jAudioProfilesList, gArrayListMethods.add, jAudioProfile);
        env->DeleteLocalRef(jAudioProfile);