diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2015-09-14 16:37:07 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2015-09-14 16:37:07 -0700 |
commit | af20bc26704458eac0ddc23f12b637939b0df7a4 (patch) | |
tree | df3518ad8366456ead184e0af23b91a6fd477b4f /services/audiopolicy | |
parent | f00b70e082c14f789c948f623daca9be7a0e36e8 (diff) | |
download | frameworks_av-af20bc26704458eac0ddc23f12b637939b0df7a4.zip frameworks_av-af20bc26704458eac0ddc23f12b637939b0df7a4.tar.gz frameworks_av-af20bc26704458eac0ddc23f12b637939b0df7a4.tar.bz2 |
AudioPolicy: don't always change ACCESSIBILITY volume
Only change the volume for AUDIO_STREAM_ACCESSIBILITY when
changing the media volume.
Bug 23366575
Change-Id: Ic42c726ec4d47615c20500c20e4d43cef159b3c6
Diffstat (limited to 'services/audiopolicy')
-rw-r--r-- | services/audiopolicy/managerdefault/AudioPolicyManager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp index b1d7b13..dfb477d 100644 --- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp +++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp @@ -1718,7 +1718,9 @@ status_t AudioPolicyManager::setStreamVolumeIndex(audio_stream_type_t stream, status = volStatus; } } - if ((device == AUDIO_DEVICE_OUT_DEFAULT) || ((curDevice & accessibilityDevice) != 0)) { + if ((accessibilityDevice != AUDIO_DEVICE_NONE) && + ((device == AUDIO_DEVICE_OUT_DEFAULT) || ((curDevice & accessibilityDevice) != 0))) + { status_t volStatus = checkAndSetVolume(AUDIO_STREAM_ACCESSIBILITY, index, desc, curDevice); } |