audio policy: fix call volume
Fix setGroupVolumeIndex() which was applying
volume for all groups if in call and causing the wrong
index to be used.
when DTMF are muted when entering call, voice call was
also muted.
Bug: 128499415
Test: call with voice volume set to 6
Change-Id: Ie1296a7a48fdfba3710acb3d7a7e4f00e7b576a5
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 4a0e764..5574e1c 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -2503,7 +2503,7 @@
}
for (auto curVolGroup : getVolumeGroups()) {
VolumeSource curVolSrc = toVolumeSource(curVolGroup);
- if (!(curVolSrc == vs || isInCall())) {
+ if (curVolSrc != vs) {
continue;
}
if (!(desc->isActive(vs) || isInCall())) {