Skip to content

Commit

Permalink
Deprecate EventBeatManager constructor (facebook#36905)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#36905

In this diff I'm deprecating EventBeatManager constructor that receives a Context as a parameter.

bypass-github-export-checks

changelog: [Android][Deprecated] deprecating EventBeatManager constructor that receives a Context as a parameter.

Reviewed By: fkgozali

Differential Revision: D44759827

fbshipit-source-id: cb117c26af0a43fe245f8778a55dfbea756b3ce6
  • Loading branch information
mdvacca authored and OlimpiaZurek committed May 22, 2023
1 parent 6495b57 commit 426b3a7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public Collection<String> getViewManagerNames() {
}
});

EventBeatManager eventBeatManager = new EventBeatManager(mBridgelessReactContext);
EventBeatManager eventBeatManager = new EventBeatManager();
mFabricUIManager =
new FabricUIManager(mBridgelessReactContext, viewManagerRegistry, eventBeatManager);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public FabricJSIModuleProvider(
@Override
public UIManager get() {
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "FabricJSIModuleProvider.get");
final EventBeatManager eventBeatManager = new EventBeatManager(mReactApplicationContext);
final EventBeatManager eventBeatManager = new EventBeatManager();
final FabricUIManager uiManager = createUIManager(eventBeatManager);

Systrace.beginSection(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,25 @@
* Class that acts as a proxy between the list of EventBeats registered in C++ and the Android side.
*/
@SuppressLint("MissingNativeLoadLibrary")
public class EventBeatManager implements BatchEventDispatchedListener {
public final class EventBeatManager implements BatchEventDispatchedListener {

static {
FabricSoLoader.staticInit();
}

@DoNotStrip private final HybridData mHybridData;
private final ReactApplicationContext mReactApplicationContext;

private static native HybridData initHybrid();

private native void tick();

@Deprecated(forRemoval = true, since = "Deprecated on v0.72.0 Use EventBeatManager() instead")
public EventBeatManager(@NonNull ReactApplicationContext reactApplicationContext) {
this();
}

public EventBeatManager() {
mHybridData = initHybrid();
mReactApplicationContext = reactApplicationContext;
}

@Override
Expand Down

0 comments on commit 426b3a7

Please sign in to comment.