Move JSPackagerWebSocketClient and JSDebuggerWebSocketClient to react/devsupport module
Summary: This move lets us remove the dependency on okhttp3 from react/bridge. The classes I moved are all strictly related to dev support features and don't need to go into the core bridge module that gets shipped to production. Reviewed By: AaaChiuuu Differential Revision: D3698977 fbshipit-source-id: 6ba1517377061690cef289a544ec1622122cef85
This commit is contained in:
parent
6e60b1763c
commit
031fe4d797
|
@ -26,11 +26,7 @@ android_library(
|
|||
react_native_dep('libraries/fbcore/src/main/java/com/facebook/common/logging:logging'),
|
||||
react_native_dep('libraries/soloader/java/com/facebook/soloader:soloader'),
|
||||
react_native_dep('third-party/java/infer-annotations:infer-annotations'),
|
||||
react_native_dep('third-party/java/jackson:core'),
|
||||
react_native_dep('third-party/java/jsr-305:jsr-305'),
|
||||
react_native_dep('third-party/java/okhttp:okhttp3'),
|
||||
react_native_dep('third-party/java/okhttp:okhttp3-ws'),
|
||||
react_native_dep('third-party/java/okio:okio'),
|
||||
react_native_target('java/com/facebook/react/common:common'),
|
||||
],
|
||||
visibility = [
|
||||
|
|
|
@ -7,6 +7,7 @@ android_library(
|
|||
deps = [
|
||||
react_native_dep('libraries/fbcore/src/main/java/com/facebook/common/logging:logging'),
|
||||
react_native_dep('third-party/java/infer-annotations:infer-annotations'),
|
||||
react_native_dep('third-party/java/jackson:core'),
|
||||
react_native_dep('third-party/java/jsr-305:jsr-305'),
|
||||
react_native_dep('third-party/java/okhttp:okhttp3'),
|
||||
react_native_dep('third-party/java/okhttp:okhttp3-ws'),
|
||||
|
|
|
@ -15,7 +15,6 @@ import android.text.TextUtils;
|
|||
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.bridge.JSPackagerWebSocketClient;
|
||||
import com.facebook.react.bridge.UiThreadUtil;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.common.network.OkHttpCallUtil;
|
||||
|
|
|
@ -45,7 +45,6 @@ import com.facebook.react.bridge.JavaJSExecutor;
|
|||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.UiThreadUtil;
|
||||
import com.facebook.react.bridge.WebsocketJavaScriptExecutor;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.common.ShakeDetector;
|
||||
import com.facebook.react.common.futures.SimpleSettableFuture;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge;
|
||||
package com.facebook.react.devsupport;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* file in the same directory.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge;
|
||||
package com.facebook.react.devsupport;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge;
|
||||
package com.facebook.react.devsupport;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
@ -19,6 +19,7 @@ import android.os.Handler;
|
|||
import android.os.Looper;
|
||||
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.bridge.JavaJSExecutor;
|
||||
|
||||
/**
|
||||
* Executes JS remotely via the react nodejs server as a proxy to a browser on the host machine.
|
||||
|
@ -40,7 +41,7 @@ public class WebsocketJavaScriptExecutor implements JavaJSExecutor {
|
|||
}
|
||||
|
||||
private static class JSExecutorCallbackFuture implements
|
||||
JSDebuggerWebSocketClient.JSDebuggerCallback {
|
||||
JSDebuggerWebSocketClient.JSDebuggerCallback {
|
||||
|
||||
private final Semaphore mSemaphore = new Semaphore(0);
|
||||
private @Nullable Throwable mCause;
|
Loading…
Reference in New Issue