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

Commit fddb5604 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "audio policy: fix wrong ring volume after music stops." into sc-dev

parents 2a8c18b4 7b6385c7
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -6439,7 +6439,8 @@ float AudioPolicyManager::computeVolume(IVolumeCurves &curves,
                volumeDb = minVolDb;
                volumeDb = minVolDb;
                ALOGV("computeVolume limiting volume to %f musicVol %f", minVolDb, musicVolDb);
                ALOGV("computeVolume limiting volume to %f musicVol %f", minVolDb, musicVolDb);
            }
            }
            if (!Intersection(deviceTypes, {AUDIO_DEVICE_OUT_BLUETOOTH_A2DP,
            if (Volume::getDeviceForVolume(deviceTypes) != AUDIO_DEVICE_OUT_SPEAKER
                    &&  !Intersection(deviceTypes, {AUDIO_DEVICE_OUT_BLUETOOTH_A2DP,
                        AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES}).empty()) {
                        AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES}).empty()) {
                // on A2DP, also ensure notification volume is not too low compared to media when
                // on A2DP, also ensure notification volume is not too low compared to media when
                // intended to be played
                // intended to be played