summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-01-27 11:32:34 -0800
committerEric Laurent <elaurent@google.com>2011-01-27 11:32:34 -0800
commit5092d8c066a1a98343bbc16e33a6753e577b5e7f (patch)
tree5b7cd832cfaab93ec925af9babdd4fdc5eb7f5df /services
parent97a38b4f1be201bbbfa23d298bb779fffd624a3d (diff)
downloadframeworks_av-5092d8c066a1a98343bbc16e33a6753e577b5e7f.zip
frameworks_av-5092d8c066a1a98343bbc16e33a6753e577b5e7f.tar.gz
frameworks_av-5092d8c066a1a98343bbc16e33a6753e577b5e7f.tar.bz2
Fix issue 2988031.
Limit SYSTEM stream volume when a headset is connected and music is playing. Change-Id: Ieb44ae5bb53ffa9cd5fe8e317798eed279b78df8
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioPolicyManagerBase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/audioflinger/AudioPolicyManagerBase.cpp b/services/audioflinger/AudioPolicyManagerBase.cpp
index 0da353a..4612af1 100644
--- a/services/audioflinger/AudioPolicyManagerBase.cpp
+++ b/services/audioflinger/AudioPolicyManagerBase.cpp
@@ -1806,7 +1806,8 @@ float AudioPolicyManagerBase::computeVolume(int stream, int index, audio_io_hand
AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES |
AudioSystem::DEVICE_OUT_WIRED_HEADSET |
AudioSystem::DEVICE_OUT_WIRED_HEADPHONE)) &&
- (getStrategy((AudioSystem::stream_type)stream) == STRATEGY_SONIFICATION) &&
+ ((getStrategy((AudioSystem::stream_type)stream) == STRATEGY_SONIFICATION) ||
+ (stream == AudioSystem::SYSTEM)) &&
streamDesc.mCanBeMuted) {
volume *= SONIFICATION_HEADSET_VOLUME_FACTOR;
// when the phone is ringing we must consider that music could have been paused just before