mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 14:48:25 +00:00
Remove FabricBinder interface
Summary: This diff removes the FabricBinder interface as it is not required anymore Reviewed By: sahrens Differential Revision: D13707495 fbshipit-source-id: ba470e7b0884d75491b1b162cd6bce09c193d863
This commit is contained in:
parent
b2459cc01c
commit
4802cffa14
@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.fabric;
|
||||
|
||||
public interface FabricBinder<T extends FabricBinding> {
|
||||
|
||||
void setBinding(T binding);
|
||||
|
||||
}
|
@ -16,7 +16,7 @@ public interface FabricBinding {
|
||||
// TODO: T31905686 change types of UIManager and EventBeatManager when moving to OSS
|
||||
void register(
|
||||
JavaScriptContextHolder jsContext,
|
||||
FabricBinder fabricBinder,
|
||||
FabricUIManager fabricUIManager,
|
||||
EventBeatManager eventBeatManager,
|
||||
MessageQueueThread jsMessageQueueThread,
|
||||
ComponentFactoryDelegate componentFactoryDelegate);
|
||||
|
@ -36,7 +36,7 @@ public class FabricJSIModuleProvider implements JSIModuleProvider<UIManager> {
|
||||
public UIManager get() {
|
||||
final EventBeatManager eventBeatManager =
|
||||
new EventBeatManager(mJSContext, mReactApplicationContext);
|
||||
final UIManager uiManager = createUIManager(eventBeatManager);
|
||||
final FabricUIManager uiManager = createUIManager(eventBeatManager);
|
||||
Systrace.beginSection(
|
||||
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "FabricJSIModuleProvider.registerBinding");
|
||||
final FabricBinding binding = new Binding();
|
||||
@ -45,13 +45,13 @@ public class FabricJSIModuleProvider implements JSIModuleProvider<UIManager> {
|
||||
.getCatalystInstance()
|
||||
.getReactQueueConfiguration()
|
||||
.getJSQueueThread();
|
||||
binding.register(mJSContext, (FabricBinder) uiManager, eventBeatManager, jsMessageQueueThread,
|
||||
binding.register(mJSContext, uiManager, eventBeatManager, jsMessageQueueThread,
|
||||
mComponentFactoryDelegate);
|
||||
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||
return uiManager;
|
||||
}
|
||||
|
||||
private UIManager createUIManager(EventBeatManager eventBeatManager) {
|
||||
private FabricUIManager createUIManager(EventBeatManager eventBeatManager) {
|
||||
Systrace.beginSection(
|
||||
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "FabricJSIModuleProvider.createUIManager");
|
||||
UIManagerModule nativeModule = mReactApplicationContext.getNativeModule(UIManagerModule.class);
|
||||
|
@ -64,7 +64,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@SuppressLint("MissingNativeLoadLibrary")
|
||||
public class FabricUIManager implements UIManager, FabricBinder<Binding>, LifecycleEventListener {
|
||||
public class FabricUIManager implements UIManager, LifecycleEventListener {
|
||||
|
||||
private static final String TAG = FabricUIManager.class.getSimpleName();
|
||||
|
||||
@ -310,7 +310,6 @@ public class FabricUIManager implements UIManager, FabricBinder<Binding>, Lifecy
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBinding(Binding binding) {
|
||||
mBinding = binding;
|
||||
}
|
||||
|
@ -12,8 +12,8 @@ import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.bridge.JavaScriptContextHolder;
|
||||
import com.facebook.react.bridge.NativeMap;
|
||||
import com.facebook.react.bridge.queue.MessageQueueThread;
|
||||
import com.facebook.react.fabric.FabricBinder;
|
||||
import com.facebook.react.fabric.FabricBinding;
|
||||
import com.facebook.react.fabric.FabricUIManager;
|
||||
import com.facebook.react.uimanager.PixelUtil;
|
||||
|
||||
@DoNotStrip
|
||||
@ -53,13 +53,13 @@ public class Binding implements FabricBinding {
|
||||
@Override
|
||||
public void register(
|
||||
JavaScriptContextHolder jsContext,
|
||||
FabricBinder fabricModule,
|
||||
FabricUIManager fabricUIManager,
|
||||
EventBeatManager eventBeatManager,
|
||||
MessageQueueThread jsMessageQueueThread,
|
||||
ComponentFactoryDelegate componentFactoryDelegate) {
|
||||
fabricModule.setBinding(this);
|
||||
fabricUIManager.setBinding(this);
|
||||
installFabricUIManager(
|
||||
jsContext.get(), fabricModule, eventBeatManager, jsMessageQueueThread, componentFactoryDelegate);
|
||||
jsContext.get(), fabricUIManager, eventBeatManager, jsMessageQueueThread, componentFactoryDelegate);
|
||||
setPixelDensity(PixelUtil.getDisplayMetricDensity());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user