Remove 'Debug JS on-device (experimental)' feature
Reviewed By: bnham Differential Revision: D5706200 fbshipit-source-id: f389222a9266819c5730860a2e3e461eb1068d0e
This commit is contained in:
parent
7542f3d659
commit
7d0c128174
|
@ -11,7 +11,6 @@
|
|||
- (void)connect;
|
||||
- (void)closeQuietly;
|
||||
- (void)sendEventToAllConnections:(NSString *)event;
|
||||
- (void)sendOpenEvent:(NSString *)pageId;
|
||||
@end
|
||||
|
||||
@interface RCTInspectorRemoteConnection : NSObject
|
||||
|
|
|
@ -51,12 +51,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)sendOpenEvent:(NSString *)pageId
|
||||
{
|
||||
NSDictionary<NSString *, id> *payload = makePageIdPayload(pageId);
|
||||
[self sendEvent:@"open" payload:payload];
|
||||
}
|
||||
|
||||
- (void)handleProxyMessage:(NSDictionary<NSString *, id> *)message
|
||||
{
|
||||
NSString *event = message[@"event"];
|
||||
|
|
|
@ -19,16 +19,6 @@ public class Inspector {
|
|||
|
||||
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() {
|
||||
try {
|
||||
return Arrays.asList(instance().getPagesNative());
|
||||
|
|
|
@ -201,12 +201,6 @@ public class DevServerHelper {
|
|||
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
}
|
||||
|
||||
public void openInspector(String id) {
|
||||
if (mInspectorPackagerConnection != null) {
|
||||
mInspectorPackagerConnection.sendOpenEvent(id);
|
||||
}
|
||||
}
|
||||
|
||||
public void sendEventToAllConnections(String event) {
|
||||
if (mInspectorPackagerConnection != null) {
|
||||
mInspectorPackagerConnection.sendEventToAllConnections(event);
|
||||
|
|
|
@ -44,7 +44,6 @@ import com.facebook.infer.annotation.Assertions;
|
|||
import com.facebook.react.R;
|
||||
import com.facebook.react.bridge.CatalystInstance;
|
||||
import com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler;
|
||||
import com.facebook.react.bridge.Inspector;
|
||||
import com.facebook.react.bridge.JavaJSExecutor;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
|
@ -385,19 +384,6 @@ public class DevSupportManagerImpl implements
|
|||
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(
|
||||
mDevSettings.isReloadOnJSChangeEnabled()
|
||||
? mApplicationContext.getString(R.string.catalyst_live_reload_off)
|
||||
|
|
|
@ -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)
|
||||
throws JSONException, IOException {
|
||||
String event = message.getString("event");
|
||||
|
|
Loading…
Reference in New Issue