Permalink
Browse files

add cmd+opt+ctrl+D to globally invoke dev menu for Android

Reviewed By: frantic

Differential Revision: D5280788

fbshipit-source-id: ce11d122ee17a2ba8d8aa2e91fc6639610791577
  • Loading branch information...
Yu-w authored and facebook-github-bot committed Jun 20, 2017
1 parent a2b0ee0 commit 01adc71ade1c3453705e5c744fa836aa2ca23e3c
@@ -98,6 +98,7 @@
public interface PackagerCommandListener {
void onPackagerReloadCommand();
void onPackagerDevMenuCommand();
void onCaptureHeapCommand(final Responder responder);
void onPokeSamplingProfilerCommand(final Responder responder);
}
@@ -145,6 +146,12 @@ public void onNotification(@Nullable Object params) {
commandListener.onPackagerReloadCommand();
}
});
handlers.put("devMenu", new NotificationOnlyHandler() {
@Override
public void onNotification(@Nullable Object params) {
commandListener.onPackagerDevMenuCommand();
}
});
handlers.put("captureHeap", new RequestOnlyHandler() {
@Override
public void onRequest(@Nullable Object params, Responder responder) {
@@ -682,6 +682,16 @@ public void run() {
});
}
@Override
public void onPackagerDevMenuCommand() {
UiThreadUtil.runOnUiThread(new Runnable() {
@Override
public void run() {
showDevOptionsDialog();
}
});
}
@Override
public void onCaptureHeapCommand(final Responder responder) {
UiThreadUtil.runOnUiThread(new Runnable() {

0 comments on commit 01adc71

Please sign in to comment.