import com.android.internal.R;
import com.android.internal.widget.LockPatternUtils;
+import android.app.ActivityManager;
import android.app.ActivityManagerNative;
import android.app.AlertDialog;
import android.app.Dialog;
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
+ // don't actually trigger the bugreport if we are running stability
+ // tests via monkey
+ if (ActivityManager.isUserAMonkey()) {
+ return;
+ }
// Add a little delay before executing, to give the
// dialog a chance to go away before it takes a
// screenshot.