Skip to content
Browse files

Android: Disable debug menu when monkey is running

When testing an app on Android using the monkey, the monkey shouldn't be able to open or interact with the dev menu.

**Test plan (required)**

My team uses this change in our app.

Adam Comella
Microsoft Corp.
Closes #10901

Differential Revision: D4176167

Pulled By: ericvicenti

fbshipit-source-id: 8eb64715ae7496cdf957ee963777f66ab358546c
  • Loading branch information
Adam Comella authored and Facebook Github Bot committed Nov 15, 2016
1 parent 7991d12 commit 9a8b5d9f4f860f16d0845d537f80bfd2f515ee93
@@ -22,6 +22,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import android.content.BroadcastReceiver;
import android.content.Context;
@@ -334,7 +335,7 @@ public void run() {

public void showDevOptionsDialog() {
if (mDevOptionsDialog != null || !mIsDevSupportEnabled) {
if (mDevOptionsDialog != null || !mIsDevSupportEnabled || ActivityManager.isUserAMonkey()) {
LinkedHashMap<String, DevOptionHandler> options = new LinkedHashMap<>();

0 comments on commit 9a8b5d9

Please sign in to comment.