Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Commit

Permalink
Lazy DI listeners init shipment
Browse files Browse the repository at this point in the history
Reviewed By: BurntBrunch

Differential Revision: D23206052

fbshipit-source-id: 9f8ccb874137505ab14f29fa8529be904abf70ca
  • Loading branch information
aandreyeu authored and facebook-github-bot committed Aug 21, 2020
1 parent 3663a80 commit b8224aa
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 18 deletions.
Expand Up @@ -18,12 +18,6 @@

public abstract class DefaultTraceOrchestratorListener implements TraceOrchestratorListener {

@Override
public void onListenerAdded() {}

@Override
public void onListenerRemoved() {}

@Override
public void onTraceFlushed(File trace, long traceId) {}

Expand Down
6 changes: 0 additions & 6 deletions java/main/com/facebook/profilo/core/TraceListenerManager.java
Expand Up @@ -23,12 +23,6 @@
private final CopyOnWriteArrayList<TraceOrchestratorListener> mEventListeners =
new CopyOnWriteArrayList<>();

@Override
public void onListenerAdded() {}

@Override
public void onListenerRemoved() {}

@Override
public void onTraceStart(TraceContext context) {
Iterator<TraceOrchestratorListener> iterator = getIterator();
Expand Down
2 changes: 0 additions & 2 deletions java/main/com/facebook/profilo/core/TraceOrchestrator.java
Expand Up @@ -299,12 +299,10 @@ public synchronized void setProfiloBridgeFactory(ProfiloBridgeFactory profiloFac

public void addListener(TraceOrchestratorListener listener) {
mListenerManager.addEventListener(listener);
listener.onListenerAdded();
}

public synchronized void removeListener(TraceOrchestratorListener listener) {
mListenerManager.removeEventListener(listener);
listener.onListenerRemoved();
}

@Override
Expand Down
Expand Up @@ -23,10 +23,6 @@ public interface TraceOrchestratorListener
BackgroundUploadService.BackgroundUploadListener,
LoggerCallbacks {

void onListenerAdded();

void onListenerRemoved();

void onTraceStart(TraceContext context);

void onTraceStop(TraceContext context);
Expand Down

0 comments on commit b8224aa

Please sign in to comment.