Using shared bridge path for RN
Reviewed By: javache Differential Revision: D5002111 fbshipit-source-id: 86c2856145a6595823fd027145b050a6fba3d90d
This commit is contained in:
parent
a8a29a92a0
commit
6796abbe55
|
@ -224,7 +224,8 @@ public class ReactInstanceManager {
|
|||
boolean setupReactContextInBackgroundEnabled,
|
||||
boolean useSeparateUIBackgroundThread,
|
||||
int minNumShakes,
|
||||
boolean splitPackagesEnabled) {
|
||||
boolean splitPackagesEnabled,
|
||||
boolean useOnlyDefaultPackages) {
|
||||
Log.d(ReactConstants.TAG, "ReactInstanceManager.ctor()");
|
||||
initializeSoLoaderIfNecessary(applicationContext);
|
||||
|
||||
|
@ -267,14 +268,16 @@ public class ReactInstanceManager {
|
|||
mPackages.add(coreModulesPackage);
|
||||
} else {
|
||||
mPackages.add(new BridgeCorePackage(this, mBackBtnHandler));
|
||||
if (mUseDeveloperSupport) {
|
||||
mPackages.add(new DebugCorePackage());
|
||||
if (!useOnlyDefaultPackages) {
|
||||
if (mUseDeveloperSupport) {
|
||||
mPackages.add(new DebugCorePackage());
|
||||
}
|
||||
mPackages.add(
|
||||
new ReactNativeCorePackage(
|
||||
this,
|
||||
mUIImplementationProvider,
|
||||
mLazyViewManagersEnabled));
|
||||
}
|
||||
mPackages.add(
|
||||
new ReactNativeCorePackage(
|
||||
this,
|
||||
mUIImplementationProvider,
|
||||
mLazyViewManagersEnabled));
|
||||
}
|
||||
mPackages.addAll(packages);
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ public class ReactInstanceManagerBuilder {
|
|||
protected boolean mUseSeparateUIBackgroundThread;
|
||||
protected int mMinNumShakes = 1;
|
||||
protected boolean mEnableSplitPackage;
|
||||
protected boolean mUseOnlyDefaultPackages;
|
||||
|
||||
/* package protected */ ReactInstanceManagerBuilder() {
|
||||
}
|
||||
|
@ -219,6 +220,11 @@ public class ReactInstanceManagerBuilder {
|
|||
return this;
|
||||
}
|
||||
|
||||
public ReactInstanceManagerBuilder setUseOnlyDefaultPackages(boolean useOnlyDefaultPackages) {
|
||||
mUseOnlyDefaultPackages = useOnlyDefaultPackages;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiates a new {@link ReactInstanceManager}.
|
||||
* Before calling {@code build}, the following must be called:
|
||||
|
@ -269,6 +275,7 @@ public class ReactInstanceManagerBuilder {
|
|||
mSetupReactContextInBackground,
|
||||
mUseSeparateUIBackgroundThread,
|
||||
mMinNumShakes,
|
||||
mEnableSplitPackage);
|
||||
mEnableSplitPackage,
|
||||
mUseOnlyDefaultPackages);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue