Assure the Inspector socket runs through the lifecycle of ReactNative

Reviewed By: AaaChiuuu

Differential Revision: D5538894

fbshipit-source-id: f48d7a1df344bd3a16f5c170b0955b7d2ef35913
This commit is contained in:
Paco Estevez Garcia
2017-08-02 17:28:48 -07:00
committed by Facebook Github Bot
parent 6a3128457f
commit 36c694364f
4 changed files with 28 additions and 3 deletions

View File

@@ -280,6 +280,9 @@ public class ReactInstanceManager {
// Instantiate ReactChoreographer in UI thread.
ReactChoreographer.initialize();
if (mUseDeveloperSupport) {
mDevSupportManager.startInspector();
}
}
public DevSupportManager getDevSupportManager() {
@@ -586,6 +589,7 @@ public class ReactInstanceManager {
if (mUseDeveloperSupport) {
mDevSupportManager.setDevSupportEnabled(false);
mDevSupportManager.stopInspector();
}
moveToBeforeCreateLifecycleState();