3 ms·
ActivityManager#isUserAMonkey()
- strangecasts 5y agoFor anyone curious - it's how you check whether the Monkey [1] UI stress-tester/fuzzer is running. There's also isUserAGoat [2] which is more of an easter egg - initially (and now) it always returns false, but certain versions return true if Goat Simulator is installed [3]. [1] https://developer.android.com/studio/test/monkey https://developer.android.com/studio/test/monkey [2] https://developer.android.com/reference/android/os/UserManager#isUserAGoat https://developer.android.com/reference/android/os/UserManag...() [3] https://android.googlesource.com/platform/frameworks/base/+/android-5.0.0_r6/core/java/android/os/UserManager.java#442 https://android.googlesource.com/platform/frameworks/base/+/...