commit | 653feedbecd4d5f2561ec3952c5f0ce55cae06d4 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Thu Jul 20 22:21:36 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Jul 20 22:21:36 2023 +0000 |
tree | eb575634b06a659ffb3a3ef15c96e811e86b19f1 | |
parent | 9d3cc90d9aac2f017521f6f640ea46401a342a6c [diff] | |
parent | 14434bf862294b908fbccc89e2c9ef6ff783bda8 [diff] |
Merge "audio: if device is change from none to new device, need get index from new device." into main am: 0cf7ca884c am: 039936c858 am: b72a3db88e am: 4d24611479 am: 14434bf862 Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2658258 Change-Id: Ib0ae65738231726d242e7a7fc441844fc4b02fa0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp index 8f10c62..f1f2048 100644 --- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp +++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -7835,6 +7835,9 @@ } 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) {