audiopolicy: Refactor AudioPolicyManager::updateCallRouting
The code of the function had almost identical paths for
Rx and Tx patches creation. Factored them out, now it's much
easier to see what is common, and what differs.
Test: audio in still present incoming and outgoing telephony calls
Change-Id: Ia02179513d76809e33c65b2dad465358acdbfc63
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.h b/services/audiopolicy/managerdefault/AudioPolicyManager.h
index ae2e7c3..6038e33 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.h
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.h
@@ -470,6 +470,9 @@
}
uint32_t updateCallRouting(audio_devices_t rxDevice, uint32_t delayMs = 0);
+ sp<AudioPatch> createTelephonyPatch(bool isRx, audio_devices_t device, uint32_t delayMs);
+ sp<DeviceDescriptor> fillAudioPortConfigForDevice(
+ const DeviceVector& devices, audio_devices_t device, audio_port_config *config);
// if argument "device" is different from AUDIO_DEVICE_NONE, startSource() will force
// the re-evaluation of the output device.