mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 14:48:25 +00:00
Setup experiment for split packages
Reviewed By: javache Differential Revision: D5314224 fbshipit-source-id: b9bc28b8f4e058db1dcc0c17f7dc84bf15eb33f9
This commit is contained in:
parent
e301a36606
commit
3525998884
@ -223,7 +223,8 @@ public class ReactInstanceManager {
|
||||
@Nullable DevBundleDownloadListener devBundleDownloadListener,
|
||||
boolean setupReactContextInBackgroundEnabled,
|
||||
boolean useSeparateUIBackgroundThread,
|
||||
int minNumShakes) {
|
||||
int minNumShakes,
|
||||
boolean splitPackagesEnabled) {
|
||||
Log.d(ReactConstants.TAG, "ReactInstanceManager.ctor()");
|
||||
initializeSoLoaderIfNecessary(applicationContext);
|
||||
|
||||
@ -256,7 +257,7 @@ public class ReactInstanceManager {
|
||||
mUseSeparateUIBackgroundThread = useSeparateUIBackgroundThread;
|
||||
mMinNumShakes = minNumShakes;
|
||||
|
||||
if (true) { // TODO Change to a QE-determined experiment variable in separate commit
|
||||
if (!splitPackagesEnabled) {
|
||||
CoreModulesPackage coreModulesPackage =
|
||||
new CoreModulesPackage(
|
||||
this,
|
||||
|
@ -47,6 +47,7 @@ public class ReactInstanceManagerBuilder {
|
||||
protected boolean mSetupReactContextInBackground;
|
||||
protected boolean mUseSeparateUIBackgroundThread;
|
||||
protected int mMinNumShakes = 1;
|
||||
protected boolean mEnableSplitPackage;
|
||||
|
||||
/* package protected */ ReactInstanceManagerBuilder() {
|
||||
}
|
||||
@ -213,6 +214,11 @@ public class ReactInstanceManagerBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ReactInstanceManagerBuilder setEnableSplitPackage(boolean enableSplitPackage) {
|
||||
mEnableSplitPackage = enableSplitPackage;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiates a new {@link ReactInstanceManager}.
|
||||
* Before calling {@code build}, the following must be called:
|
||||
@ -262,6 +268,7 @@ public class ReactInstanceManagerBuilder {
|
||||
mDevBundleDownloadListener,
|
||||
mSetupReactContextInBackground,
|
||||
mUseSeparateUIBackgroundThread,
|
||||
mMinNumShakes);
|
||||
mMinNumShakes,
|
||||
mEnableSplitPackage);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user