mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-09 22:43:10 +08:00
Reverted commit D3400379
Reviewed By: mhorowitz Differential Revision: D3400379 fbshipit-source-id: b7e733e74bb0f4fbd597fd073826c399ece2c47f
This commit is contained in:
committed by
Facebook Github Bot 2
parent
b0fed416cb
commit
525d35ba67
@@ -14,10 +14,6 @@ import com.facebook.soloader.SoLoader;
|
||||
|
||||
@DoNotStrip
|
||||
public class JSCJavaScriptExecutor extends JavaScriptExecutor {
|
||||
static {
|
||||
ReactBridge.staticInit();
|
||||
}
|
||||
|
||||
public static class Factory implements JavaScriptExecutor.Factory {
|
||||
@Override
|
||||
public JavaScriptExecutor create(WritableNativeMap jscConfig) throws Exception {
|
||||
@@ -25,6 +21,10 @@ public class JSCJavaScriptExecutor extends JavaScriptExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
SoLoader.loadLibrary(ReactBridge.REACT_NATIVE_LIB);
|
||||
}
|
||||
|
||||
public JSCJavaScriptExecutor(WritableNativeMap jscConfig) {
|
||||
initialize(jscConfig);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.facebook.soloader.SoLoader;
|
||||
@DoNotStrip
|
||||
public abstract class NativeArray {
|
||||
static {
|
||||
ReactBridge.staticInit();
|
||||
SoLoader.loadLibrary(ReactBridge.REACT_NATIVE_LIB);
|
||||
}
|
||||
|
||||
protected NativeArray(HybridData hybridData) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.facebook.soloader.SoLoader;
|
||||
@DoNotStrip
|
||||
public abstract class NativeMap {
|
||||
static {
|
||||
ReactBridge.staticInit();
|
||||
SoLoader.loadLibrary(ReactBridge.REACT_NATIVE_LIB);
|
||||
}
|
||||
|
||||
public NativeMap(HybridData hybridData) {
|
||||
|
||||
@@ -24,10 +24,6 @@ import com.facebook.proguard.annotations.DoNotStrip;
|
||||
*/
|
||||
@DoNotStrip
|
||||
public class ProxyJavaScriptExecutor extends JavaScriptExecutor {
|
||||
static {
|
||||
ReactBridge.staticInit();
|
||||
}
|
||||
|
||||
public static class Factory implements JavaScriptExecutor.Factory {
|
||||
private final JavaJSExecutor.Factory mJavaJSExecutorFactory;
|
||||
|
||||
@@ -41,6 +37,10 @@ public class ProxyJavaScriptExecutor extends JavaScriptExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
SoLoader.loadLibrary(ReactBridge.REACT_NATIVE_LIB);
|
||||
}
|
||||
|
||||
private @Nullable JavaJSExecutor mJavaJSExecutor;
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,22 +24,16 @@ import com.facebook.soloader.SoLoader;
|
||||
@DoNotStrip
|
||||
public class ReactBridge extends Countable {
|
||||
|
||||
private static final String REACT_NATIVE_LIB = "reactnativejni";
|
||||
private static final String XREACT_NATIVE_LIB = "reactnativejnifb";
|
||||
/* package */ static final String REACT_NATIVE_LIB = "reactnativejni";
|
||||
|
||||
static {
|
||||
staticInit();
|
||||
SoLoader.loadLibrary(REACT_NATIVE_LIB);
|
||||
}
|
||||
|
||||
private final ReactCallback mCallback;
|
||||
private final JavaScriptExecutor mJSExecutor;
|
||||
private final MessageQueueThread mNativeModulesQueueThread;
|
||||
|
||||
public static void staticInit() {
|
||||
SoLoader.loadLibrary(REACT_NATIVE_LIB);
|
||||
SoLoader.loadLibrary(XREACT_NATIVE_LIB);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param jsExecutor the JS executor to use to run JS
|
||||
* @param callback the callback class used to invoke native modules
|
||||
|
||||
@@ -21,8 +21,9 @@ import java.util.ArrayList;
|
||||
*/
|
||||
@DoNotStrip
|
||||
public class ReadableNativeArray extends NativeArray implements ReadableArray {
|
||||
|
||||
static {
|
||||
ReactBridge.staticInit();
|
||||
SoLoader.loadLibrary(ReactBridge.REACT_NATIVE_LIB);
|
||||
}
|
||||
|
||||
protected ReadableNativeArray(HybridData hybridData) {
|
||||
|
||||
@@ -22,8 +22,9 @@ import java.util.HashMap;
|
||||
*/
|
||||
@DoNotStrip
|
||||
public class ReadableNativeMap extends NativeMap implements ReadableMap {
|
||||
|
||||
static {
|
||||
ReactBridge.staticInit();
|
||||
SoLoader.loadLibrary(ReactBridge.REACT_NATIVE_LIB);
|
||||
}
|
||||
|
||||
protected ReadableNativeMap(HybridData hybridData) {
|
||||
|
||||
@@ -21,8 +21,9 @@ import com.facebook.soloader.SoLoader;
|
||||
*/
|
||||
@DoNotStrip
|
||||
public class WritableNativeArray extends ReadableNativeArray implements WritableArray {
|
||||
|
||||
static {
|
||||
ReactBridge.staticInit();
|
||||
SoLoader.loadLibrary(ReactBridge.REACT_NATIVE_LIB);
|
||||
}
|
||||
|
||||
public WritableNativeArray() {
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.facebook.soloader.SoLoader;
|
||||
@DoNotStrip
|
||||
public class WritableNativeMap extends ReadableNativeMap implements WritableMap {
|
||||
static {
|
||||
ReactBridge.staticInit();
|
||||
SoLoader.loadLibrary(ReactBridge.REACT_NATIVE_LIB);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user