summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhou Song <zhous@codeaurora.org>2014-06-10 16:29:56 +0800
committerLinux Build Service Account <lnxbuild@localhost>2014-11-04 08:22:42 -0700
commit5f84fc07341b7b74839eaa61eebb9377dc2a0176 (patch)
tree800c1103989cdb1da80c8c2d8ffe2c03e3da6fac
parente96b538e168846a31edd7c608267d79f3f30b871 (diff)
downloadandroid_hardware_libhardware_legacy-5f84fc07341b7b74839eaa61eebb9377dc2a0176.tar.gz
android_hardware_libhardware_legacy-5f84fc07341b7b74839eaa61eebb9377dc2a0176.tar.bz2
android_hardware_libhardware_legacy-5f84fc07341b7b74839eaa61eebb9377dc2a0176.zip
audio_policy: Fix for audio routing speaker though BT is connected
- Speaker device is selected by getDeviceForStrategy() though BT is connected as mA2dpSuspended is still remaining as 'true' even after ending the voice call. - This flasg is not updated by checkA2dpSuspend() as force usage for communication and record is still FORCE_BT_SCO after ending voice call. - Modified condition check to set mA2dpSuspended to 'false' as soon as phone state is changed to MODE_NORMAL porting from change:Ib3a67268be33a10c6bcdf6437868990a92a06c2f Change-Id: I86ebb66cd165e8009bfa6193d2ad9ab383996283 CRs-Fixed: 671810
-rw-r--r--audio/AudioPolicyManagerBase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp
index 1d49abb..5096f95 100644
--- a/audio/AudioPolicyManagerBase.cpp
+++ b/audio/AudioPolicyManagerBase.cpp
@@ -2408,7 +2408,7 @@ void AudioPolicyManagerBase::checkA2dpSuspend()
if (mA2dpSuspended) {
if (((mScoDeviceAddress == "") ||
((mForceUse[AudioSystem::FOR_COMMUNICATION] != AudioSystem::FORCE_BT_SCO) &&
- (mForceUse[AudioSystem::FOR_RECORD] != AudioSystem::FORCE_BT_SCO))) &&
+ (mForceUse[AudioSystem::FOR_RECORD] != AudioSystem::FORCE_BT_SCO))) ||
((mPhoneState != AudioSystem::MODE_IN_CALL) &&
(mPhoneState != AudioSystem::MODE_RINGTONE))) {
@@ -2418,7 +2418,7 @@ void AudioPolicyManagerBase::checkA2dpSuspend()
} else {
if (((mScoDeviceAddress != "") &&
((mForceUse[AudioSystem::FOR_COMMUNICATION] == AudioSystem::FORCE_BT_SCO) ||
- (mForceUse[AudioSystem::FOR_RECORD] == AudioSystem::FORCE_BT_SCO))) ||
+ (mForceUse[AudioSystem::FOR_RECORD] == AudioSystem::FORCE_BT_SCO))) &&
((mPhoneState == AudioSystem::MODE_IN_CALL) ||
(mPhoneState == AudioSystem::MODE_RINGTONE))) {