From 5f8c129f19c4ce29cb420404bf074b1e328e3f13 Mon Sep 17 00:00:00 2001 From: Emily Janzer Date: Wed, 17 Jul 2019 11:00:34 -0700 Subject: [PATCH] Remove unused removeRootView() method from FabricUIManager Summary: FabricUIManager.removeRootView() isn't currently used, removing it from the UIManager interface. It looks like this is called from JS in paper renderers, but not Fabric, so we should be good to delete it. Reviewed By: shergin, mdvacca Differential Revision: D16275118 fbshipit-source-id: b8f3ae1dc7574ce17d8cc9e7fee72ef5dcc9b323 --- .../main/java/com/facebook/react/bridge/UIManager.java | 3 --- .../com/facebook/react/fabric/FabricUIManager.java | 10 ---------- .../com/facebook/react/uimanager/UIManagerModule.java | 1 + 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/UIManager.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/UIManager.java index 66a62addaf7..782dea3355d 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/UIManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/UIManager.java @@ -15,9 +15,6 @@ public interface UIManager extends JSIModule, PerformanceCounter { int addRootView( final T rootView, WritableMap initialProps, @Nullable String initialUITemplate); - /** Unregisters a new root view. */ - void removeRootView(int reactRootTag); - /** * Updates the layout specs of the RootShadowNode based on the Measure specs received by * parameters. diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java index 2bfde7ec28f..61cd22c47c1 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java @@ -182,16 +182,6 @@ public class FabricUIManager implements UIManager, LifecycleEventListener { mEventDispatcher.dispatchAllEvents(); } - @Override - public void removeRootView(int reactRootTag) { - // TODO T31905686: integrate with the unmounting of Fabric React Renderer. - mMountingManager.removeRootView(reactRootTag); - mReactContextForRootTag.remove(reactRootTag); - if (DEBUG) { - FLog.d(TAG, "Removing surface for reactTag: ", reactRootTag); - } - } - @Override public void initialize() { mEventDispatcher.registerEventEmitter(FABRIC, new FabricEventEmitter(this)); diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java index 15f152cefc9..478dc2b4070 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java @@ -421,6 +421,7 @@ public class UIManagerModule extends ReactContextBaseJavaModule return tag; } + /** Unregisters a new root view. */ @ReactMethod public void removeRootView(int rootViewTag) { mUIImplementation.removeRootView(rootViewTag);