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

Commit 4d246114 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

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

Merge "audio: if device is change from none to new device, need get index from new device." into main am: 0cf7ca88 am: 039936c8 am: b72a3db8

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



Change-Id: I23f0f5761b24ef185596b3e88885db4233084f08
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents fe62dcaf b72a3db8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -7741,6 +7741,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) {