audio policy: fix media volume after ringtone
Fix regression introduced by commit 11c499a5 causing
music volume not to be restored after ringtone playback
over duplicated output (speaker + A2DP).
Bug: 31539910
Change-Id: I1c4eebea1f1a8f82ae2acfeecb9a61c437a74e25
diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp
index e374106..aeabe93 100755
--- a/policy_hal/AudioPolicyManager.cpp
+++ b/policy_hal/AudioPolicyManager.cpp
@@ -843,6 +843,10 @@
dev,
force,
delayMs);
+ // re-apply device specific volume if not done by setOutputDevice()
+ if (!force) {
+ applyStreamVolumes(desc, newDevice, delayMs);
+ }
}
}
// update the outputs if stopping one with a stream that can affect notification routing