am ba5df0d0: Merge "Prevent monkey from triggering bugreport" into lmp-dev
* commit 'ba5df0d01970ec97d64397d9db55f8d1ad98aa16': Prevent monkey from triggering bugreport
This commit is contained in:
@@ -23,6 +23,7 @@ import com.android.internal.telephony.TelephonyProperties;
|
||||
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;
|
||||
@@ -370,6 +371,11 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user