Setup experiment for split packages

Reviewed By: javache

Differential Revision: D5314224

fbshipit-source-id: b9bc28b8f4e058db1dcc0c17f7dc84bf15eb33f9
This commit is contained in:
Kathy Gray 2017-07-04 03:54:57 -07:00 коммит произвёл Facebook Github Bot
Родитель e301a36606
Коммит 3525998884
2 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -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);
}
}