📜 ⬆️ ⬇️

Are you a goat, user?

In Android 4.2 (Jelly Bean), a new method i sUserAGoat () has appeared . The purpose of this method is rather vague, the documentation says “Used to determine whether to make this call is subject to teleportations” - is the user who called this method an object for teleportation. The method should return true if the user is a goat. But if you look at the source of the method, you can find out that the method always returned false .

More precisely, it was until recently. With the advent of Android 5 Lollipop, the documentation has been amended - As of LOLLIPOP, you can now automatically identify goats recognition technology. - Starting with LOLLIPOP, this method can now automatically detect goats using advanced goat recognition technology. Link to the documentation .
Curious programmers again got into the source and found the code

public boolean isUserAGoat() { return mContext.getPackageManager() .isPackageAvailable("com.coffeestainstudios.goatsimulator"); } 


In other words, the method now checks if the goat simulator application is installed on the user. By the name of the package, an application was found on Google Play - Goat Simulator . The application is paid. Something I do not want to check whether I am a goat, so I did not buy.

')

Source: https://habr.com/ru/post/355448/


All Articles