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

Commit 2c8ec7bb authored by Francois Gaffie's avatar Francois Gaffie Committed by Automerger Merge Worker
Browse files

AudioSystem: startAudioSource: ensure port handle initialized am: 523571c3 am: 0f065138

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

Change-Id: I11a7708654089bf8e22fd9659f42d51e4f97e61d
parents bb7fc790 0f065138
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1869,7 +1869,11 @@ android_media_AudioSystem_startAudioSource(JNIEnv *env, jobject clazz,
    audio_port_handle_t handle;
    status_t status = AudioSystem::startAudioSource(&nAudioPortConfig, paa.get(), &handle);
    ALOGV("AudioSystem::startAudioSource() returned %d handle %d", status, handle);
    return handle > 0 ? handle : nativeToJavaStatus(status);
    if (status != NO_ERROR) {
        return nativeToJavaStatus(status);
    }
    ALOG_ASSERT(handle > 0, "%s: invalid handle reported on successful call", __func__);
    return handle;
}

static jint