Remove 'Debug JS on-device (experimental)' feature

Reviewed By: bnham

Differential Revision: D5706200

fbshipit-source-id: f389222a9266819c5730860a2e3e461eb1068d0e
This commit is contained in:
Nurzhan Bakibayev 2017-08-29 04:21:04 -07:00 committed by Facebook Github Bot
parent 7542f3d659
commit 7d0c128174
6 changed files with 0 additions and 46 deletions

View File

@ -11,7 +11,6 @@
- (void)connect; - (void)connect;
- (void)closeQuietly; - (void)closeQuietly;
- (void)sendEventToAllConnections:(NSString *)event; - (void)sendEventToAllConnections:(NSString *)event;
- (void)sendOpenEvent:(NSString *)pageId;
@end @end
@interface RCTInspectorRemoteConnection : NSObject @interface RCTInspectorRemoteConnection : NSObject

View File

@ -51,12 +51,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
return self; return self;
} }
- (void)sendOpenEvent:(NSString *)pageId
{
NSDictionary<NSString *, id> *payload = makePageIdPayload(pageId);
[self sendEvent:@"open" payload:payload];
}
- (void)handleProxyMessage:(NSDictionary<NSString *, id> *)message - (void)handleProxyMessage:(NSDictionary<NSString *, id> *)message
{ {
NSString *event = message[@"event"]; NSString *event = message[@"event"];

View File

@ -19,16 +19,6 @@ public class Inspector {
private final HybridData mHybridData; private final HybridData mHybridData;
public static boolean isSupported() {
try {
// This isn't a very nice way to do this but it works :|
instance().getPagesNative();
return true;
} catch (UnsatisfiedLinkError e) {
return false;
}
}
public static List<Page> getPages() { public static List<Page> getPages() {
try { try {
return Arrays.asList(instance().getPagesNative()); return Arrays.asList(instance().getPagesNative());

View File

@ -201,12 +201,6 @@ public class DevServerHelper {
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} }
public void openInspector(String id) {
if (mInspectorPackagerConnection != null) {
mInspectorPackagerConnection.sendOpenEvent(id);
}
}
public void sendEventToAllConnections(String event) { public void sendEventToAllConnections(String event) {
if (mInspectorPackagerConnection != null) { if (mInspectorPackagerConnection != null) {
mInspectorPackagerConnection.sendEventToAllConnections(event); mInspectorPackagerConnection.sendEventToAllConnections(event);

View File

@ -44,7 +44,6 @@ import com.facebook.infer.annotation.Assertions;
import com.facebook.react.R; import com.facebook.react.R;
import com.facebook.react.bridge.CatalystInstance; import com.facebook.react.bridge.CatalystInstance;
import com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler; import com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler;
import com.facebook.react.bridge.Inspector;
import com.facebook.react.bridge.JavaJSExecutor; import com.facebook.react.bridge.JavaJSExecutor;
import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableArray;
@ -385,19 +384,6 @@ public class DevSupportManagerImpl implements
handleReloadJS(); handleReloadJS();
} }
}); });
if (Inspector.isSupported()) {
options.put(
"Debug JS on-device (experimental)", new DevOptionHandler() {
@Override
public void onOptionSelected() {
List<Inspector.Page> pages = Inspector.getPages();
if (pages.size() > 0) {
// TODO: We should get the actual page id instead of the first one.
mDevServerHelper.openInspector(String.valueOf(pages.get(0).getId()));
}
}
});
}
options.put( options.put(
mDevSettings.isReloadOnJSChangeEnabled() mDevSettings.isReloadOnJSChangeEnabled()
? mApplicationContext.getString(R.string.catalyst_live_reload_off) ? mApplicationContext.getString(R.string.catalyst_live_reload_off)

View File

@ -56,15 +56,6 @@ public class InspectorPackagerConnection {
} }
} }
public void sendOpenEvent(String pageId) {
try {
JSONObject payload = makePageIdPayload(pageId);
sendEvent("open", payload);
} catch (JSONException e) {
FLog.e(TAG, "Failed to open page", e);
}
}
void handleProxyMessage(JSONObject message) void handleProxyMessage(JSONObject message)
throws JSONException, IOException { throws JSONException, IOException {
String event = message.getString("event"); String event = message.getString("event");