mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-10 22:45:24 +08:00
revert the revert (D2816377)
Reviewed By: zjj010104 Differential Revision: D2816742 fb-gh-sync-id: 2b3b46e54055cfd4b7a137a1f21a330cecd7d663
This commit is contained in:
committed by
facebook-github-bot-7
parent
e14b24936d
commit
bb73e98513
@@ -52,6 +52,8 @@ import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.common.annotations.VisibleForTesting;
|
||||
import com.facebook.react.devsupport.DevServerHelper;
|
||||
import com.facebook.react.devsupport.DevSupportManager;
|
||||
import com.facebook.react.devsupport.DevSupportManagerImpl;
|
||||
import com.facebook.react.devsupport.DisabledDevSupportManager;
|
||||
import com.facebook.react.devsupport.ReactInstanceDevCommandsHandler;
|
||||
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
|
||||
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
||||
@@ -252,15 +254,15 @@ import com.facebook.systrace.Systrace;
|
||||
mJSMainModuleName = jsMainModuleName;
|
||||
mPackages = packages;
|
||||
mUseDeveloperSupport = useDeveloperSupport;
|
||||
// We need to instantiate DevSupportManager regardless to the useDeveloperSupport option,
|
||||
// although will prevent dev support manager from displaying any options or dialogs by
|
||||
// checking useDeveloperSupport option before calling setDevSupportEnabled on this manager
|
||||
// TODO(6803830): Don't instantiate devsupport manager when useDeveloperSupport is false
|
||||
mDevSupportManager = new DevSupportManager(
|
||||
applicationContext,
|
||||
mDevInterface,
|
||||
mJSMainModuleName,
|
||||
useDeveloperSupport);
|
||||
if (mUseDeveloperSupport) {
|
||||
mDevSupportManager = new DevSupportManagerImpl(
|
||||
applicationContext,
|
||||
mDevInterface,
|
||||
mJSMainModuleName,
|
||||
useDeveloperSupport);
|
||||
} else {
|
||||
mDevSupportManager = new DisabledDevSupportManager();
|
||||
}
|
||||
mBridgeIdleDebugListener = bridgeIdleDebugListener;
|
||||
mLifecycleState = initialLifecycleState;
|
||||
mUIImplementationProvider = uiImplementationProvider;
|
||||
|
||||
Reference in New Issue
Block a user