From 707622ac8442edd124d5ba93a00cfa6cac0f9fa9 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Thu, 17 Jan 2019 12:27:57 -0800 Subject: [PATCH] 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 --- .../facebook/react/fabric/FabricBinding.java | 25 ------------------- .../react/fabric/FabricJSIModuleProvider.java | 2 +- .../facebook/react/fabric/jsi/Binding.java | 5 +--- 3 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 ReactAndroid/src/main/java/com/facebook/react/fabric/FabricBinding.java diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricBinding.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricBinding.java deleted file mode 100644 index 07697375d..000000000 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricBinding.java +++ /dev/null @@ -1,25 +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; - -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(); -} diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricJSIModuleProvider.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricJSIModuleProvider.java index 0f64f671b..9af888e02 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricJSIModuleProvider.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricJSIModuleProvider.java @@ -39,7 +39,7 @@ public class FabricJSIModuleProvider implements JSIModuleProvider { 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() diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jsi/Binding.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/jsi/Binding.java index 155440b13..95d1cf681 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jsi/Binding.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jsi/Binding.java @@ -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(); }