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

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

Merge "audio policy: fix crash if output for DAP is not opened" into rvc-dev...

Merge "audio policy: fix crash if output for DAP is not opened" into rvc-dev am: 36c77d40 am: 2f8e4539 am: 1be392b4 am: 49544b64

Change-Id: Iadc112307ae5ac040e4377c7a93ef9455d15447c
parents 4ae7ddb0 49544b64
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -954,7 +954,8 @@ status_t AudioPolicyManager::getOutputForAttrInt(
                                                  primaryMix->mDeviceAddress,
                                                  primaryMix->mDeviceAddress,
                                                  AUDIO_FORMAT_DEFAULT);
                                                  AUDIO_FORMAT_DEFAULT);
        sp<SwAudioOutputDescriptor> policyDesc = primaryMix->getOutput();
        sp<SwAudioOutputDescriptor> policyDesc = primaryMix->getOutput();
        if (policyDesc == nullptr || (policyDesc->mFlags & AUDIO_OUTPUT_FLAG_DIRECT)) {
        if (deviceDesc != nullptr
                && (policyDesc == nullptr || (policyDesc->mFlags & AUDIO_OUTPUT_FLAG_DIRECT))) {
            audio_io_handle_t newOutput;
            audio_io_handle_t newOutput;
            status = openDirectOutput(
            status = openDirectOutput(
                    *stream, session, config,
                    *stream, session, config,