CreateAudioProcessor: do not propagate an unset echo control factory to the AudioProcessing instance

In this CL we avoid the propagation of the echo control factory to the AudioProcessing instance when this is not set. That propagation was unnecessarily overriding the echo control factory that might have been already set on that AudioProcessing instance.

Change-Id: Ife8f479bc7a81c35ecf656e7d0ddfcc98981c74f
Bug: webrtc:10344
Reviewed-on: https://webrtc-review.googlesource.com/c/123765
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26802}
diff --git a/modules/audio_processing/test/audio_processing_simulator.cc b/modules/audio_processing/test/audio_processing_simulator.cc
index 331d7e5..c2dad17 100644
--- a/modules/audio_processing/test/audio_processing_simulator.cc
+++ b/modules/audio_processing/test/audio_processing_simulator.cc
@@ -437,9 +437,11 @@
   }
 
   RTC_CHECK(ap_builder_);
-  ap_.reset((*ap_builder_)
-                .SetEchoControlFactory(std::move(echo_control_factory))
-                .Create(config));
+  if (echo_control_factory) {
+    ap_builder_->SetEchoControlFactory(std::move(echo_control_factory));
+  }
+  ap_.reset((*ap_builder_).Create(config));
+
   RTC_CHECK(ap_);
 
   ap_->ApplyConfig(apm_config);