From 3963c7aa56ee54614aff77dd7f7250b227159192 Mon Sep 17 00:00:00 2001 From: Emily Janzer Date: Tue, 3 Dec 2019 11:30:42 -0800 Subject: [PATCH] Clean up unused functions on ReactContext Summary: Removing the methods I recently added for storing/retrieving an instance key on a ReactContext. Reviewed By: PeteTheHeat, mdvacca Differential Revision: D18710637 fbshipit-source-id: d34683ec660bd999db8112865e15392606fc9237 --- .../react/bridge/ReactApplicationContext.java | 11 ---------- .../facebook/react/bridge/ReactContext.java | 21 ------------------- .../react/uimanager/ThemedReactContext.java | 6 ------ 3 files changed, 38 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactApplicationContext.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactApplicationContext.java index 86e90392d88..9fa01ba5f89 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactApplicationContext.java +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactApplicationContext.java @@ -20,15 +20,4 @@ public class ReactApplicationContext extends ReactContext { public ReactApplicationContext(Context context) { super(context.getApplicationContext()); } - - /** - * A constructor that takes a unique string identifier for the React instance. For bridgeless mode - * only - do not use. - * - *

TODO T43898341 Make this package-private once we've consolidated the classes that need this - * in this package - */ - public ReactApplicationContext(Context context, String instanceKey) { - super(context.getApplicationContext(), instanceKey); - } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java index a82c21a33d5..a3a92274390 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java @@ -55,20 +55,9 @@ public class ReactContext extends ContextWrapper { private @Nullable NativeModuleCallExceptionHandler mNativeModuleCallExceptionHandler; private @Nullable NativeModuleCallExceptionHandler mExceptionHandlerWrapper; private @Nullable WeakReference mCurrentActivity; - private final @Nullable String mInstanceKey; public ReactContext(Context base) { super(base); - mInstanceKey = null; - } - - /** - * A constructor that takes a unique string identifier for the React instance. For bridgeless mode - * only - do not use. - */ - /* package */ ReactContext(Context base, String instanceKey) { - super(base); - mInstanceKey = instanceKey; } /** Set and initialize CatalystInstance for this Context. This should be called exactly once. */ @@ -433,14 +422,4 @@ public class ReactContext extends ContextWrapper { public JavaScriptContextHolder getJavaScriptContextHolder() { return mCatalystInstance.getJavaScriptContextHolder(); } - - /** - * TODO T43898341 Make this package-private once we've consolidated the classes that need this in - * this package - * - * @return The key for the associated React instance - */ - public @Nullable String getInstanceKey() { - return mInstanceKey; - } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ThemedReactContext.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ThemedReactContext.java index e956822eefc..6ad03ea1b2c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ThemedReactContext.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ThemedReactContext.java @@ -61,12 +61,6 @@ public class ThemedReactContext extends ReactContext { return mReactApplicationContext.getCurrentActivity(); } - @Nullable - @Override - public String getInstanceKey() { - return mReactApplicationContext.getInstanceKey(); - } - /** * @return a {@link String} that represents the ID of the js application that is being rendered * with this {@link ThemedReactContext}