summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-06-07 09:10:26 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-06-07 09:10:26 -0700
commit5568b826b6b9b084f76b777db8b0411c7565e870 (patch)
tree8a8975a267dfc3b91f9c18765ae1668821a486f1
parentfa3697d716b444bbea6be480801536c44bf69214 (diff)
parentac3cf10ef6de12e69540a1244ac7255f93fa7502 (diff)
downloadhardware_libhardware_legacy-5568b826b6b9b084f76b777db8b0411c7565e870.zip
hardware_libhardware_legacy-5568b826b6b9b084f76b777db8b0411c7565e870.tar.gz
hardware_libhardware_legacy-5568b826b6b9b084f76b777db8b0411c7565e870.tar.bz2
Merge "audio policy: fix notification volume limitation" into jb-dev
-rw-r--r--audio/AudioPolicyManagerBase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp
index fcee6ae..ee758b3 100644
--- a/audio/AudioPolicyManagerBase.cpp
+++ b/audio/AudioPolicyManagerBase.cpp
@@ -2642,7 +2642,8 @@ float AudioPolicyManagerBase::computeVolume(int stream,
// when the phone is ringing we must consider that music could have been paused just before
// by the music application and behave as if music was active if the last music track was
// just stopped
- if (outputDesc->mRefCount[AudioSystem::MUSIC] || mLimitRingtoneVolume) {
+ if (isStreamActive(AudioSystem::MUSIC, SONIFICATION_HEADSET_MUSIC_DELAY) ||
+ mLimitRingtoneVolume) {
float musicVol = computeVolume(AudioSystem::MUSIC,
mStreams[AudioSystem::MUSIC].getVolumeIndex(device),
output,