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

Commit 3efa3c2a authored by Robert Lee's avatar Robert Lee Committed by android-build-merger
Browse files

Merge "audiopolicy: fix ring stream volume cannot apply when previewing ringtone" into qt-dev

am: e807b2f4

Change-Id: I83933102c07ec7f372b904f4644e5331351a5442
parents 3a343f56 e807b2f4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2463,6 +2463,11 @@ status_t AudioPolicyManager::setVolumeIndexForAttributes(const audio_attributes_
        sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i);
        audio_devices_t curDevice = desc->devices().types();

        if (curDevice & AUDIO_DEVICE_OUT_SPEAKER_SAFE) {
            curDevice |= AUDIO_DEVICE_OUT_SPEAKER;
            curDevice &= ~AUDIO_DEVICE_OUT_SPEAKER_SAFE;
        }

        // Inter / intra volume group priority management: Loop on strategies arranged by priority
        // If a higher priority strategy is active, and the output is routed to a device with a
        // HW Gain management, do not change the volume