Skip to content

Commit

Permalink
Clean up unused functions on ReactContext
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Emily Janzer authored and facebook-github-bot committed Dec 3, 2019
1 parent bde1d63 commit 3963c7a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -433,14 +422,4 @@ public boolean startActivityForResult(Intent intent, int code, Bundle bundle) {
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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ public boolean hasCurrentActivity() {
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}
Expand Down

0 comments on commit 3963c7a

Please sign in to comment.