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

Commit cdee29ca authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Merge "audio policy: do not consider telephony TX device as a local device"...

Merge "audio policy: do not consider telephony TX device as a local device" into rvc-dev am: 8847f120 am: e963d9d6 am: a3a0258a

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

Change-Id: I69e8204cc18850bf1b2b65461b6056b133c49294
parents 92c96390 a3a0258a
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -690,7 +690,9 @@ bool SwAudioOutputCollection::isActiveLocally(VolumeSource volumeSource, uint32_
        const sp<SwAudioOutputDescriptor> outputDesc = this->valueAt(i);
        if (outputDesc->isActive(volumeSource, inPastMs, sysTime)
                && (!(outputDesc->devices()
                        .containsDeviceAmongTypes(getAllOutRemoteDevices())))) {
                        .containsDeviceAmongTypes(getAllOutRemoteDevices())
                        || outputDesc->devices()
                            .onlyContainsDevicesWithType(AUDIO_DEVICE_OUT_TELEPHONY_TX)))) {
            return true;
        }
    }
@@ -722,9 +724,13 @@ bool SwAudioOutputCollection::isStrategyActiveOnSameModule(product_strategy_t ps
        const sp<SwAudioOutputDescriptor> otherDesc = valueAt(i);
        if (desc->sharesHwModuleWith(otherDesc) &&
                otherDesc->isStrategyActive(ps, inPastMs, sysTime)) {
            if (desc == otherDesc
                    || !otherDesc->devices()
                            .onlyContainsDevicesWithType(AUDIO_DEVICE_OUT_TELEPHONY_TX)) {
                return true;
            }
        }
    }
    return false;
}