|
93 | 93 | import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; |
94 | 94 | import com.facebook.react.modules.core.DeviceEventManagerModule; |
95 | 95 | import com.facebook.react.modules.core.ReactChoreographer; |
96 | | -import com.facebook.react.modules.debug.interfaces.DeveloperSettings; |
97 | 96 | import com.facebook.react.packagerconnection.RequestHandler; |
98 | 97 | import com.facebook.react.uimanager.DisplayMetricsHolder; |
99 | 98 | import com.facebook.react.uimanager.ReactRoot; |
@@ -194,7 +193,7 @@ public interface ReactInstanceEventListener |
194 | 193 | private boolean mUseFallbackBundle = true; |
195 | 194 | private volatile boolean mInstanceManagerInvalidated = false; |
196 | 195 |
|
197 | | - private class ReactContextInitParams { |
| 196 | + private static class ReactContextInitParams { |
198 | 197 | private final JavaScriptExecutorFactory mJsExecutorFactory; |
199 | 198 | private final JSBundleLoader mJsBundleLoader; |
200 | 199 |
|
@@ -301,14 +300,11 @@ public static ReactInstanceManagerBuilder builder() { |
301 | 300 | mDevSupportManager.startInspector(); |
302 | 301 | } |
303 | 302 |
|
304 | | - // Using `if (true)` just to prevent tests / lint errors. |
305 | | - if (true) { |
306 | | - // Legacy architecture of React Native is deprecated and can't be initialized anymore. |
307 | | - // More details on: |
308 | | - // https://github.com/react-native-community/discussions-and-proposals/blob/nc/legacy-arch-removal/proposals/0929-legacy-architecture-removal.md |
309 | | - throw new UnsupportedOperationException( |
310 | | - "ReactInstanceManager.createReactContext is unsupported."); |
311 | | - } |
| 303 | + // Legacy architecture of React Native is deprecated and can't be initialized anymore. |
| 304 | + // More details on: |
| 305 | + // https://github.com/react-native-community/discussions-and-proposals/blob/nc/legacy-arch-removal/proposals/0929-legacy-architecture-removal.md |
| 306 | + throw new UnsupportedOperationException( |
| 307 | + "ReactInstanceManager.createReactContext is unsupported."); |
312 | 308 | } |
313 | 309 |
|
314 | 310 | private ReactInstanceDevHelper createDevHelperInterface() { |
@@ -450,7 +446,6 @@ private void recreateReactContextInBackgroundInner() { |
450 | 446 | UiThreadUtil.assertOnUiThread(); |
451 | 447 |
|
452 | 448 | if (mUseDeveloperSupport && mJSMainModulePath != null) { |
453 | | - final DeveloperSettings devSettings = mDevSupportManager.getDevSettings(); |
454 | 449 | if (!Systrace.isTracing(TRACE_TAG_REACT)) { |
455 | 450 | if (mBundleLoader == null) { |
456 | 451 | mDevSupportManager.handleReloadJS(); |
@@ -1164,6 +1159,7 @@ private void runCreateReactContextOnNewThread(final ReactContextInitParams initP |
1164 | 1159 | try { |
1165 | 1160 | ReactInstanceManager.this.mHasStartedDestroying.wait(); |
1166 | 1161 | } catch (InterruptedException e) { |
| 1162 | + // Interrupted while waiting for destruction to complete, just retry |
1167 | 1163 | continue; |
1168 | 1164 | } |
1169 | 1165 | } |
|
0 commit comments