Loading services/audiopolicy/managerdefault/AudioPolicyManager.cpp +15 −13 Original line number Diff line number Diff line Loading @@ -3804,21 +3804,23 @@ status_t AudioPolicyManager::setVolumeIndexForAttributes(const audio_attributes_ } } // update voice volume if the an active call route exists if (mCallRxSourceClient != nullptr && mCallRxSourceClient->isConnected() && (curSrcDevices.find( Volume::getDeviceForVolume({mCallRxSourceClient->sinkDevice()->type()})) != curSrcDevices.end())) { // update voice volume if the an active call route exists and target device is same as current if (mCallRxSourceClient != nullptr && mCallRxSourceClient->isConnected()) { audio_devices_t rxSinkDevice = mCallRxSourceClient->sinkDevice()->type(); audio_devices_t curVoiceDevice = Volume::getDeviceForVolume({rxSinkDevice}); if (curVoiceDevice == device && curSrcDevices.find(curVoiceDevice) != curSrcDevices.end()) { bool isVoiceVolSrc; bool isBtScoVolSrc; if (isVolumeConsistentForCalls(vs, {mCallRxSourceClient->sinkDevice()->type()}, if (isVolumeConsistentForCalls(vs, {rxSinkDevice}, isVoiceVolSrc, isBtScoVolSrc, __func__) && (isVoiceVolSrc || isBtScoVolSrc)) { bool voiceVolumeManagedByHost = !isBtScoVolSrc && !audio_is_ble_out_device(mCallRxSourceClient->sinkDevice()->type()); !audio_is_ble_out_device(rxSinkDevice); setVoiceVolume(index, curves, voiceVolumeManagedByHost, 0); } } } mpClientInterface->onAudioVolumeGroupChanged(group, 0 /*flags*/); return status; Loading Loading
services/audiopolicy/managerdefault/AudioPolicyManager.cpp +15 −13 Original line number Diff line number Diff line Loading @@ -3804,21 +3804,23 @@ status_t AudioPolicyManager::setVolumeIndexForAttributes(const audio_attributes_ } } // update voice volume if the an active call route exists if (mCallRxSourceClient != nullptr && mCallRxSourceClient->isConnected() && (curSrcDevices.find( Volume::getDeviceForVolume({mCallRxSourceClient->sinkDevice()->type()})) != curSrcDevices.end())) { // update voice volume if the an active call route exists and target device is same as current if (mCallRxSourceClient != nullptr && mCallRxSourceClient->isConnected()) { audio_devices_t rxSinkDevice = mCallRxSourceClient->sinkDevice()->type(); audio_devices_t curVoiceDevice = Volume::getDeviceForVolume({rxSinkDevice}); if (curVoiceDevice == device && curSrcDevices.find(curVoiceDevice) != curSrcDevices.end()) { bool isVoiceVolSrc; bool isBtScoVolSrc; if (isVolumeConsistentForCalls(vs, {mCallRxSourceClient->sinkDevice()->type()}, if (isVolumeConsistentForCalls(vs, {rxSinkDevice}, isVoiceVolSrc, isBtScoVolSrc, __func__) && (isVoiceVolSrc || isBtScoVolSrc)) { bool voiceVolumeManagedByHost = !isBtScoVolSrc && !audio_is_ble_out_device(mCallRxSourceClient->sinkDevice()->type()); !audio_is_ble_out_device(rxSinkDevice); setVoiceVolume(index, curves, voiceVolumeManagedByHost, 0); } } } mpClientInterface->onAudioVolumeGroupChanged(group, 0 /*flags*/); return status; Loading