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

Commit f64b001b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "IAudioFlinger: fix incorrect audio patch handle" into sc-dev am: 3718813a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/15376098

Change-Id: I9ac7cbc38418bd5ecb25671773d0dba83ccff304
parents 44876078 3718813a
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -665,7 +665,11 @@ status_t AudioFlingerClientAdapter::getAudioPort(struct audio_port_v7* port) {
status_t AudioFlingerClientAdapter::createAudioPatch(const struct audio_patch* patch,
                                                     audio_patch_handle_t* handle) {
    media::AudioPatch patchAidl = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_patch_AudioPatch(*patch));
    int32_t aidlRet;
    int32_t aidlRet = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_patch_handle_t_int32_t(
                    AUDIO_PATCH_HANDLE_NONE));
    if (handle != nullptr) {
        aidlRet = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_patch_handle_t_int32_t(*handle));
    }
    RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(
            mDelegate->createAudioPatch(patchAidl, &aidlRet)));
    if (handle != nullptr) {
@@ -1140,7 +1144,8 @@ Status AudioFlingerServerAdapter::getAudioPort(const media::AudioPort& port,
Status AudioFlingerServerAdapter::createAudioPatch(const media::AudioPatch& patch,
                                                   int32_t* _aidl_return) {
    audio_patch patchLegacy = VALUE_OR_RETURN_BINDER(aidl2legacy_AudioPatch_audio_patch(patch));
    audio_patch_handle_t handleLegacy;
    audio_patch_handle_t handleLegacy = VALUE_OR_RETURN_BINDER(
            aidl2legacy_int32_t_audio_patch_handle_t(*_aidl_return));
    RETURN_BINDER_IF_ERROR(mDelegate->createAudioPatch(&patchLegacy, &handleLegacy));
    *_aidl_return = VALUE_OR_RETURN_BINDER(legacy2aidl_audio_patch_handle_t_int32_t(handleLegacy));
    return Status::ok();