Split QPL logging from ProfiloBridgeListener
Summary: Profilo has some special logging to QPL when start/stop/upload a trace. This piece logic is currently embedded in ProfiloBridgeListener, I'm splitting it into a separate Listener so that could be reused in IG.
@@ -97,7 +97,7 @@ public final class TraceOrchestrator
BackgroundUploadService getUploadService();
ConfigProvider getProvider();
- TraceListener getListener();
+ TraceListener[] getListeners();
boolean isMultiProcessTracingEnabled();
}
@@ -284,11 +284,13 @@ public final class TraceOrchestrator
public synchronized void setProfiloBridgeFactory(ProfiloBridgeFactory profiloFactory) {
mProfiloBridgeFactory = profiloFactory;
- TraceListener listener = profiloFactory.getListener();
- if (listener != null) {
+ TraceListener[] listeners = profiloFactory.getListeners();
+ if (listeners != null) {
+ for (TraceListener listener : listeners) {
mListenerManager.addEventListener(listener);
}
}
+ }
public void addListener(TraceListener listener) {
mListenerManager.addEventListener(listener);
