add flag to test running BG UI operation on a separate thread from the native modules thread

Reviewed By: achen1

Differential Revision: D4912045

fbshipit-source-id: b0b1aea24f8d463b95369636b7df2422a23aab22
This commit is contained in:
Aaron Chiu
2017-04-20 16:10:09 -07:00
committed by Facebook Github Bot
parent 97a86634f7
commit 3a3e5affc3
2 changed files with 13 additions and 2 deletions

View File

@@ -43,6 +43,7 @@ public class ReactInstanceManagerBuilder {
protected boolean mLazyNativeModulesEnabled;
protected boolean mLazyViewManagersEnabled;
protected boolean mSetupReactContextInBackground;
protected boolean mUseSeparateUIBackgroundThread;
/* package protected */ ReactInstanceManagerBuilder() {
}
@@ -193,6 +194,12 @@ public class ReactInstanceManagerBuilder {
return this;
}
public ReactInstanceManagerBuilder setUseSeparateUIBackgroundThread(
boolean useSeparateUIBackgroundThread) {
mUseSeparateUIBackgroundThread = useSeparateUIBackgroundThread;
return this;
}
/**
* Instantiates a new {@link ReactInstanceManager}.
* Before calling {@code build}, the following must be called:
@@ -238,6 +245,7 @@ public class ReactInstanceManagerBuilder {
mRedBoxHandler,
mLazyNativeModulesEnabled,
mLazyViewManagersEnabled,
mSetupReactContextInBackground);
mSetupReactContextInBackground,
mUseSeparateUIBackgroundThread);
}
}