summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-07-15 15:35:58 -0700
committerEric Laurent <elaurent@google.com>2013-07-15 15:41:08 -0700
commite92d623811f3fd3e7cc5e5dd8bc93c0c0a8fdf50 (patch)
tree92c880140ab556b3658ed786ce81434be76350c6
parent66707435156d8d99d795271a7bd54943065b4c2d (diff)
downloadlibhardware_legacy-jb-mr2.0.0-release.tar.gz
Make sure that we apply default device volume to active outputs in case no specific volume for selected device is received afterward. Bug: 9760269. Change-Id: I216de40396e1075e77493c97e8b192cd3a31d546
-rw-r--r--audio/AudioPolicyManagerBase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp
index 236bf69..bf3f36a 100644
--- a/audio/AudioPolicyManagerBase.cpp
+++ b/audio/AudioPolicyManagerBase.cpp
@@ -1036,7 +1036,7 @@ status_t AudioPolicyManagerBase::setStreamVolumeIndex(AudioSystem::stream_type s
for (size_t i = 0; i < mOutputs.size(); i++) {
audio_devices_t curDevice =
getDeviceForVolume(mOutputs.valueAt(i)->device());
- if (device == curDevice) {
+ if ((device == AUDIO_DEVICE_OUT_DEFAULT) || (device == curDevice)) {
status_t volStatus = checkAndSetVolume(stream, index, mOutputs.keyAt(i), curDevice);
if (volStatus != NO_ERROR) {
status = volStatus;