Make the new bridge the default

Reviewed By: astreet

Differential Revision: D3507482

fbshipit-source-id: b62f3bf0fe1dd4f49594e441f4e00b9e20ec972b
This commit is contained in:
Chris Hopman
2016-07-01 14:41:34 -07:00
committed by Facebook Github Bot 2
parent 1a0c69f4b7
commit bf79f87895
2 changed files with 6 additions and 28 deletions

View File

@@ -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"),

View File

@@ -1,22 +0,0 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
package com.facebook.react;
import com.facebook.infer.annotation.Assertions;
import com.facebook.react.uimanager.UIImplementationProvider;
public abstract class XReactInstanceManager {
/**
* Creates a builder that is defaulted to using the new bridge.
*/
public static ReactInstanceManager.Builder builder() {
return new ReactInstanceManager.Builder().setUseNewBridge();
}
}