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

Commit 8199b3f7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix code issues in APM found with unit tests" am: 47f6a73c am:...

Merge "Fix code issues in APM found with unit tests" am: 47f6a73c am: d5a63612 am: 3a966e88 am: de4e12fb am: 8c8fdfea

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



Change-Id: I88ade14e5fe3fe1dbdaa0f6d18eaa55ae6ed2d2e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 368c9f4f 8c8fdfea
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3133,7 +3133,7 @@ status_t AudioPolicyManager::getVolumeIndexForAttributes(const audio_attributes_
    // stream by the engine.
    DeviceTypeSet deviceTypes = {device};
    if (device == AUDIO_DEVICE_OUT_DEFAULT_FOR_VOLUME) {
        DeviceTypeSet deviceTypes = mEngine->getOutputDevicesForAttributes(
        deviceTypes = mEngine->getOutputDevicesForAttributes(
                attr, nullptr, true /*fromCache*/).types();
    }
    return getVolumeIndex(getVolumeCurves(attr), index, deviceTypes);
@@ -3143,7 +3143,7 @@ status_t AudioPolicyManager::getVolumeIndex(const IVolumeCurves &curves,
                                            int &index,
                                            const DeviceTypeSet& deviceTypes) const
{
    if (isSingleDeviceType(deviceTypes, audio_is_output_device)) {
    if (!isSingleDeviceType(deviceTypes, audio_is_output_device)) {
        return BAD_VALUE;
    }
    index = curves.getVolumeIndex(deviceTypes);