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

Commit 80986da9 authored by chenxin20's avatar chenxin20
Browse files

audio: if device is change from none to new device, need get index from new device.



SHENNONG-8068

if device is change from none to new device, need get index from new device.

Change-Id: Iaf88052e0e40efc5dbe19b1225fc3e0e3674af41
Signed-off-by: default avatarchenxin20 <chenxin20@xiaomi.com>
parent 0177138c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -7380,6 +7380,9 @@ status_t AudioPolicyManager::checkAndSetVolume(IVolumeCurves &curves,
    }
    if (deviceTypes.empty()) {
        deviceTypes = outputDesc->devices().types();
        index = curves.getVolumeIndex(deviceTypes);
        ALOGD("%s if deviceTypes is change from none to device %s, need get index %d",
                __func__, dumpDeviceTypes(deviceTypes).c_str(), index);
    }

    if (curves.getVolumeIndexMin() < 0 || curves.getVolumeIndexMax() < 0) {