5 ms·
It reminded me of isUserAGoat https://developer.android.com/reference/android/os/UserManager#isUserAGoat https://developer.android.com/reference/android/os/User
by lawgimenez 4y ago
It reminded me of isUserAGoat https://developer.android.com/reference/android/os/UserManager#isUserAGoat https://developer.android.com/reference/android/os/UserManag...()
- mysterydip 4y ago"Used to determine whether the user making this call is subject to teleportations." As a non-android developer, I am now more confused.
- olibhel 4y agoAs a chromium task manager, I count teleported goats.
- hbn 4y agoI'm pretty sure it used to return true if the user had Goat Simulator installed. Never played the game but I'm assuming there's something to do with teleportation in it.
- exikyut 4y agoYeah, it did O.o 2249 public boolean isUserAGoat() { 2250 if (mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R) { 2251 return false; 2252 } 2253 // Caution: This is NOT @UserHandleAware (because mContext is getApplicationContext and 2254 // can hold a different userId), but for R+ it returns false, so it doesn't matter anyway. 2255 return mContext.getPackageManager() 2256 .isPackageAvailable("com.coffeestainstudios.goatsimulator"); 2257 } https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/android/os/UserManager.java;l=2236-2257 https://cs.android.com/android/platform/superproject/+/maste...
- ddulaney 4y agoIt's a reference to a very old (and since removed, at least in my version) Chrome Easter egg where Chrome Task Manager had a hidden column called "Goats Teleported". See https://bugs.chromium.org/p/chromium/issues/detail?id=31482 https://bugs.chromium.org/p/chromium/issues/detail?id=31482
- origin_path 4y agoActually both are references to a very old game (Castlevania), which contained the mythical Goat Teleporter. It became a sort of internal Google meme/in-joke used whenever you needed some arbitrary object in an example. Goat teleporters show up in a few places in Google-external material, not just Chrome and Android. I recall them being occasionally mentioned when I worked there too, though it's been many years and I forget exactly how it got started. https://gamefaqs.gamespot.com/ps/196885-castlevania-symphony-of-the-night/faqs/3787 https://gamefaqs.gamespot.com/ps/196885-castlevania-symphony... If you search for it you'll find all the references are by Google except one or two (which are probably ex-googlers repeating the meme): https://www.google.com/search?q=%22goat+teleporter%22 https://www.google.com/search?q=%22goat+teleporter%22
- codedokode 4y agoThere is also a constant named "DISALLOW_FUN" [1]. Probably intended for corporate devices. [1] https://developer.android.com/reference/android/os/UserManager#DISALLOW_FUN https://developer.android.com/reference/android/os/UserManag...
- lawgimenez 4y agoNice!
- jsmith45 4y agoApparently that user restriction is actually tested in two places in the codebase. Having the restiction on your user will prevent access to the Android version easter egg. It will also prevent access to debug features in whatever "DocumentUI" is. I suppose third party apps could also test for it, and do things with it, but is is really just intended as a joke.
- mywittyname 4y agoWasn't there a function like, "isUserAMonkey()"? I recall seeing that years ago and got a chuckle out of it, but that reference doesn't include the function call.
- lawgimenez 4y agoYea there is that method. I think it has something to do with chaos monkey testing or some sort.