mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 12:34:17 +00:00
Revert D2739392 to fix events dash loading on android
Reviewed By: andreicoman11 Differential Revision: D2770201 fb-gh-sync-id: 6391936f41ba18606637c801645c3177ed1da9ea
This commit is contained in:
parent
8cd7730080
commit
022eac9bd8
@ -19,7 +19,6 @@ import android.app.Application;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
import com.facebook.infer.annotation.Assertions;
|
import com.facebook.infer.annotation.Assertions;
|
||||||
import com.facebook.react.bridge.NativeModuleCallExceptionHandler;
|
|
||||||
import com.facebook.react.bridge.NotThreadSafeBridgeIdleDebugListener;
|
import com.facebook.react.bridge.NotThreadSafeBridgeIdleDebugListener;
|
||||||
import com.facebook.react.bridge.ReactApplicationContext;
|
import com.facebook.react.bridge.ReactApplicationContext;
|
||||||
import com.facebook.react.bridge.ReactContext;
|
import com.facebook.react.bridge.ReactContext;
|
||||||
@ -160,7 +159,6 @@ public abstract class ReactInstanceManager {
|
|||||||
protected boolean mUseDeveloperSupport;
|
protected boolean mUseDeveloperSupport;
|
||||||
protected @Nullable LifecycleState mInitialLifecycleState;
|
protected @Nullable LifecycleState mInitialLifecycleState;
|
||||||
protected @Nullable UIImplementationProvider mUIImplementationProvider;
|
protected @Nullable UIImplementationProvider mUIImplementationProvider;
|
||||||
protected @Nullable NativeModuleCallExceptionHandler mNativeModuleCallExceptionHandler;
|
|
||||||
|
|
||||||
protected Builder() {
|
protected Builder() {
|
||||||
}
|
}
|
||||||
@ -244,16 +242,6 @@ public abstract class ReactInstanceManager {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the exception handler for all native module calls. If not set, the default
|
|
||||||
* {@link DevSupportManager} will be used, which shows a redbox in dev mode and rethrows
|
|
||||||
* (crashes the app) in prod mode.
|
|
||||||
*/
|
|
||||||
public Builder setNativeModuleCallExceptionHandler(NativeModuleCallExceptionHandler handler) {
|
|
||||||
mNativeModuleCallExceptionHandler = handler;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new {@link ReactInstanceManagerImpl}.
|
* Instantiates a new {@link ReactInstanceManagerImpl}.
|
||||||
* Before calling {@code build}, the following must be called:
|
* Before calling {@code build}, the following must be called:
|
||||||
@ -286,8 +274,7 @@ public abstract class ReactInstanceManager {
|
|||||||
mUseDeveloperSupport,
|
mUseDeveloperSupport,
|
||||||
mBridgeIdleDebugListener,
|
mBridgeIdleDebugListener,
|
||||||
Assertions.assertNotNull(mInitialLifecycleState, "Initial lifecycle state was not set"),
|
Assertions.assertNotNull(mInitialLifecycleState, "Initial lifecycle state was not set"),
|
||||||
mUIImplementationProvider,
|
mUIImplementationProvider);
|
||||||
mNativeModuleCallExceptionHandler);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,6 @@ import com.facebook.react.bridge.JavaScriptExecutor;
|
|||||||
import com.facebook.react.bridge.JavaScriptModule;
|
import com.facebook.react.bridge.JavaScriptModule;
|
||||||
import com.facebook.react.bridge.JavaScriptModulesConfig;
|
import com.facebook.react.bridge.JavaScriptModulesConfig;
|
||||||
import com.facebook.react.bridge.NativeModule;
|
import com.facebook.react.bridge.NativeModule;
|
||||||
import com.facebook.react.bridge.NativeModuleCallExceptionHandler;
|
|
||||||
import com.facebook.react.bridge.NativeModuleRegistry;
|
import com.facebook.react.bridge.NativeModuleRegistry;
|
||||||
import com.facebook.react.bridge.NotThreadSafeBridgeIdleDebugListener;
|
import com.facebook.react.bridge.NotThreadSafeBridgeIdleDebugListener;
|
||||||
import com.facebook.react.bridge.ProxyJavaScriptExecutor;
|
import com.facebook.react.bridge.ProxyJavaScriptExecutor;
|
||||||
@ -101,7 +100,6 @@ import com.facebook.systrace.Systrace;
|
|||||||
private volatile boolean mHasStartedCreatingInitialContext = false;
|
private volatile boolean mHasStartedCreatingInitialContext = false;
|
||||||
private final UIImplementationProvider mUIImplementationProvider;
|
private final UIImplementationProvider mUIImplementationProvider;
|
||||||
private final MemoryPressureRouter mMemoryPressureRouter;
|
private final MemoryPressureRouter mMemoryPressureRouter;
|
||||||
private final @Nullable NativeModuleCallExceptionHandler mNativeModuleCallExceptionHandler;
|
|
||||||
|
|
||||||
private final ReactInstanceDevCommandsHandler mDevInterface =
|
private final ReactInstanceDevCommandsHandler mDevInterface =
|
||||||
new ReactInstanceDevCommandsHandler() {
|
new ReactInstanceDevCommandsHandler() {
|
||||||
@ -197,8 +195,7 @@ import com.facebook.systrace.Systrace;
|
|||||||
boolean useDeveloperSupport,
|
boolean useDeveloperSupport,
|
||||||
@Nullable NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener,
|
@Nullable NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener,
|
||||||
LifecycleState initialLifecycleState,
|
LifecycleState initialLifecycleState,
|
||||||
UIImplementationProvider uiImplementationProvider,
|
UIImplementationProvider uiImplementationProvider) {
|
||||||
NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler) {
|
|
||||||
initializeSoLoaderIfNecessary(applicationContext);
|
initializeSoLoaderIfNecessary(applicationContext);
|
||||||
|
|
||||||
mApplicationContext = applicationContext;
|
mApplicationContext = applicationContext;
|
||||||
@ -219,7 +216,6 @@ import com.facebook.systrace.Systrace;
|
|||||||
mLifecycleState = initialLifecycleState;
|
mLifecycleState = initialLifecycleState;
|
||||||
mUIImplementationProvider = uiImplementationProvider;
|
mUIImplementationProvider = uiImplementationProvider;
|
||||||
mMemoryPressureRouter = new MemoryPressureRouter(applicationContext);
|
mMemoryPressureRouter = new MemoryPressureRouter(applicationContext);
|
||||||
mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -657,16 +653,13 @@ import com.facebook.systrace.Systrace;
|
|||||||
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
NativeModuleCallExceptionHandler exceptionHandler = mNativeModuleCallExceptionHandler != null
|
|
||||||
? mNativeModuleCallExceptionHandler
|
|
||||||
: mDevSupportManager;
|
|
||||||
CatalystInstanceImpl.Builder catalystInstanceBuilder = new CatalystInstanceImpl.Builder()
|
CatalystInstanceImpl.Builder catalystInstanceBuilder = new CatalystInstanceImpl.Builder()
|
||||||
.setCatalystQueueConfigurationSpec(CatalystQueueConfigurationSpec.createDefault())
|
.setCatalystQueueConfigurationSpec(CatalystQueueConfigurationSpec.createDefault())
|
||||||
.setJSExecutor(jsExecutor)
|
.setJSExecutor(jsExecutor)
|
||||||
.setRegistry(nativeModuleRegistry)
|
.setRegistry(nativeModuleRegistry)
|
||||||
.setJSModulesConfig(javaScriptModulesConfig)
|
.setJSModulesConfig(javaScriptModulesConfig)
|
||||||
.setJSBundleLoader(jsBundleLoader)
|
.setJSBundleLoader(jsBundleLoader)
|
||||||
.setNativeModuleCallExceptionHandler(exceptionHandler);
|
.setNativeModuleCallExceptionHandler(mDevSupportManager);
|
||||||
|
|
||||||
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "createCatalystInstance");
|
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "createCatalystInstance");
|
||||||
CatalystInstance catalystInstance;
|
CatalystInstance catalystInstance;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user