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
This commit is contained in:
Emily Janzer
2019-12-03 11:33:00 -08:00
committed by Facebook Github Bot
parent bde1d63c85
commit 3963c7aa56
3 changed files with 0 additions and 38 deletions
@@ -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.
*
* <p>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);
}
}
@@ -55,20 +55,9 @@ public class ReactContext extends ContextWrapper {
private @Nullable NativeModuleCallExceptionHandler mNativeModuleCallExceptionHandler;
private @Nullable NativeModuleCallExceptionHandler mExceptionHandlerWrapper;
private @Nullable WeakReference<Activity> 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;
}
}
@@ -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}