Monday 4 December 2017

android - Strange function in ActivityManager: isUserAMonkey. What does this mean, what is its use?

itemprop="text">

I found the following function in
package
android.app.ActivityManager.




public
static boolean isUserAMonkey
()


The href="http://developer.android.com/reference/android/app/ActivityManager.html#isUserAMonkey()">reference
describes:





public static boolean isUserAMonkey () Since: API
Level 8



Returns "true" if the user interface
is currently being messed with by a
monkey.





I
was shocked by this strange function. And have a few
questions.




  • What
    does this (user interface is currently being messed with by a
    monkey)
    mean?


  • What is the practical use of
    this function?


  • Why do they use
    isUserAMonkey for the function
    name?





Answer




This method is for checking whether the
current user is a rel="nofollow noreferrer">test user by some automatic testing, called 'monkey' by
Android devs
.


No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...