mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-01 14:25:08 +08:00
Make the new bridge the default
Reviewed By: astreet Differential Revision: D3507482 fbshipit-source-id: b62f3bf0fe1dd4f49594e441f4e00b9e20ec972b
This commit is contained in:
committed by
Facebook Github Bot 2
parent
1a0c69f4b7
commit
bf79f87895
@@ -195,7 +195,7 @@ public abstract class ReactInstanceManager {
|
||||
protected @Nullable Activity mCurrentActivity;
|
||||
protected @Nullable DefaultHardwareBackBtnHandler mDefaultHardwareBackBtnHandler;
|
||||
protected @Nullable RedBoxHandler mRedBoxHandler;
|
||||
protected boolean mUseNewBridge;
|
||||
protected boolean mUseOldBridge;
|
||||
|
||||
protected Builder() {
|
||||
}
|
||||
@@ -310,8 +310,8 @@ public abstract class ReactInstanceManager {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setUseNewBridge() {
|
||||
mUseNewBridge = true;
|
||||
public Builder setUseOldBridge(boolean enable) {
|
||||
mUseOldBridge = enable;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -339,8 +339,8 @@ public abstract class ReactInstanceManager {
|
||||
mUIImplementationProvider = new UIImplementationProvider();
|
||||
}
|
||||
|
||||
if (mUseNewBridge) {
|
||||
return new XReactInstanceManagerImpl(
|
||||
if (mUseOldBridge) {
|
||||
return new ReactInstanceManagerImpl(
|
||||
Assertions.assertNotNull(
|
||||
mApplication,
|
||||
"Application property has not been set with this builder"),
|
||||
@@ -357,7 +357,7 @@ public abstract class ReactInstanceManager {
|
||||
mJSCConfig,
|
||||
mRedBoxHandler);
|
||||
} else {
|
||||
return new ReactInstanceManagerImpl(
|
||||
return new XReactInstanceManagerImpl(
|
||||
Assertions.assertNotNull(
|
||||
mApplication,
|
||||
"Application property has not been set with this builder"),
|
||||
|
||||
Reference in New Issue
Block a user