It will tell you if the user is the Test Monkey or the monkey runner.
"The Monkey is a command-line tool that that you can run on any emulator instance or on a device. It sends a pseudo-random stream of user events into the system, which acts as a stress test on the application software you are developing."
You can use it like that:
public boolean wasItTheMonkey(){
ActivityManager activityManager = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
if(activityManager.isUserAMonkey()) {
Log.d(TAG,"it was the monkey");
return true;
}
Log.d(TAG,"it was an user");
return false;
}
See here.