Refactor FabricBinding class

Summary: This diff removes the FabricBinding interface becuase it is not needed anymore.

Reviewed By: sahrens

Differential Revision: D13707494

fbshipit-source-id: 7b50dcd40559356464a860ba32d9a0130ab2da6e
This commit is contained in:
David Vacca 2019-01-17 12:27:57 -08:00 committed by Facebook Github Bot
parent 4802cffa14
commit 707622ac84
3 changed files with 2 additions and 30 deletions

View File

@ -1,25 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* <p>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;
import com.facebook.react.bridge.JavaScriptContextHolder;
import com.facebook.react.bridge.queue.MessageQueueThread;
import com.facebook.react.fabric.jsi.ComponentFactoryDelegate;
import com.facebook.react.fabric.jsi.EventBeatManager;
public interface FabricBinding {
// TODO: T31905686 change types of UIManager and EventBeatManager when moving to OSS
void register(
JavaScriptContextHolder jsContext,
FabricUIManager fabricUIManager,
EventBeatManager eventBeatManager,
MessageQueueThread jsMessageQueueThread,
ComponentFactoryDelegate componentFactoryDelegate);
void unregister();
}

View File

@ -39,7 +39,7 @@ public class FabricJSIModuleProvider implements JSIModuleProvider<UIManager> {
final FabricUIManager uiManager = createUIManager(eventBeatManager);
Systrace.beginSection(
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "FabricJSIModuleProvider.registerBinding");
final FabricBinding binding = new Binding();
final Binding binding = new Binding();
MessageQueueThread jsMessageQueueThread =
mReactApplicationContext
.getCatalystInstance()

View File

@ -12,13 +12,12 @@ 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.FabricBinding;
import com.facebook.react.fabric.FabricUIManager;
import com.facebook.react.uimanager.PixelUtil;
@DoNotStrip
@SuppressLint("MissingNativeLoadLibrary")
public class Binding implements FabricBinding {
public class Binding {
static {
FabricSoLoader.staticInit();
@ -50,7 +49,6 @@ public class Binding implements FabricBinding {
public native void setConstraints(
int rootTag, float minWidth, float maxWidth, float minHeight, float maxHeight);
@Override
public void register(
JavaScriptContextHolder jsContext,
FabricUIManager fabricUIManager,
@ -65,7 +63,6 @@ public class Binding implements FabricBinding {
private native void uninstallFabricUIManager();
@Override
public void unregister() {
uninstallFabricUIManager();
}