mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 22:58:19 +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,
|
@Nullable DevBundleDownloadListener devBundleDownloadListener,
|
||||||
boolean setupReactContextInBackgroundEnabled,
|
boolean setupReactContextInBackgroundEnabled,
|
||||||
boolean useSeparateUIBackgroundThread,
|
boolean useSeparateUIBackgroundThread,
|
||||||
int minNumShakes) {
|
int minNumShakes,
|
||||||
|
boolean splitPackagesEnabled) {
|
||||||
Log.d(ReactConstants.TAG, "ReactInstanceManager.ctor()");
|
Log.d(ReactConstants.TAG, "ReactInstanceManager.ctor()");
|
||||||
initializeSoLoaderIfNecessary(applicationContext);
|
initializeSoLoaderIfNecessary(applicationContext);
|
||||||
|
|
||||||
@ -256,7 +257,7 @@ public class ReactInstanceManager {
|
|||||||
mUseSeparateUIBackgroundThread = useSeparateUIBackgroundThread;
|
mUseSeparateUIBackgroundThread = useSeparateUIBackgroundThread;
|
||||||
mMinNumShakes = minNumShakes;
|
mMinNumShakes = minNumShakes;
|
||||||
|
|
||||||
if (true) { // TODO Change to a QE-determined experiment variable in separate commit
|
if (!splitPackagesEnabled) {
|
||||||
CoreModulesPackage coreModulesPackage =
|
CoreModulesPackage coreModulesPackage =
|
||||||
new CoreModulesPackage(
|
new CoreModulesPackage(
|
||||||
this,
|
this,
|
||||||
|
@ -47,6 +47,7 @@ public class ReactInstanceManagerBuilder {
|
|||||||
protected boolean mSetupReactContextInBackground;
|
protected boolean mSetupReactContextInBackground;
|
||||||
protected boolean mUseSeparateUIBackgroundThread;
|
protected boolean mUseSeparateUIBackgroundThread;
|
||||||
protected int mMinNumShakes = 1;
|
protected int mMinNumShakes = 1;
|
||||||
|
protected boolean mEnableSplitPackage;
|
||||||
|
|
||||||
/* package protected */ ReactInstanceManagerBuilder() {
|
/* package protected */ ReactInstanceManagerBuilder() {
|
||||||
}
|
}
|
||||||
@ -213,6 +214,11 @@ public class ReactInstanceManagerBuilder {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ReactInstanceManagerBuilder setEnableSplitPackage(boolean enableSplitPackage) {
|
||||||
|
mEnableSplitPackage = enableSplitPackage;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new {@link ReactInstanceManager}.
|
* Instantiates a new {@link ReactInstanceManager}.
|
||||||
* Before calling {@code build}, the following must be called:
|
* Before calling {@code build}, the following must be called:
|
||||||
@ -262,6 +268,7 @@ public class ReactInstanceManagerBuilder {
|
|||||||
mDevBundleDownloadListener,
|
mDevBundleDownloadListener,
|
||||||
mSetupReactContextInBackground,
|
mSetupReactContextInBackground,
|
||||||
mUseSeparateUIBackgroundThread,
|
mUseSeparateUIBackgroundThread,
|
||||||
mMinNumShakes);
|
mMinNumShakes,
|
||||||
|
mEnableSplitPackage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user