Remove TMMDelegate's dependency on ReactApplicationContext

Summary: `TurboModuleManagerDelegate` is an interface used to query/create TurboModules. It doesn't need to know anything about `ReactApplicationContext`. So, I'm removing all references of `ReactApplicationContext` from this class.

Reviewed By: mdvacca

Differential Revision: D15590552

fbshipit-source-id: 761d3ed71f124955f9c6b997e68a7a8338182126
This commit is contained in:
Ramanpreet Nara
2019-06-04 08:30:46 -07:00
committed by Facebook Github Bot
parent fd7f5bb768
commit dbad0fd607
2 changed files with 2 additions and 8 deletions
@@ -20,7 +20,7 @@ public abstract class ReactPackageTurboModuleManagerDelegate extends TurboModule
private final ReactApplicationContext mReactApplicationContext;
public ReactPackageTurboModuleManagerDelegate(ReactApplicationContext reactApplicationContext, List<ReactPackage> packages) {
super(reactApplicationContext);
super();
mReactApplicationContext = reactApplicationContext;
for (ReactPackage reactPackage : packages) {
if (reactPackage instanceof TurboReactPackage) {
@@ -20,17 +20,11 @@ public abstract class TurboModuleManagerDelegate {
}
private final HybridData mHybridData;
private final ReactApplicationContext mReactApplicationContext;
protected abstract HybridData initHybrid();
protected TurboModuleManagerDelegate(ReactApplicationContext rac) {
protected TurboModuleManagerDelegate() {
mHybridData = initHybrid();
mReactApplicationContext = rac;
}
protected ReactApplicationContext getReactApplicationContext() {
return mReactApplicationContext;
}
/**