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

Commit e807b2f4 authored by Robert Lee's avatar Robert Lee Committed by Android (Google) Code Review
Browse files

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

parents 8d14f5cc 5e66e79e
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