Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>From their <strong><a href="https://android.googlesource.com/platform/frameworks/base/+/android-5.0.0_r6/core/java/android/os/UserManager.java#433" rel="noreferrer">source</a></strong>, the method used to return <code>false</code> until it was changed in API 21.</p> <pre><code>/** * Used to determine whether the user making this call is subject to * teleportations. * @return whether the user making this call is a goat */ public boolean isUserAGoat() { return false; } </code></pre> <p>It looks like the method has no real use for us as developers. Someone has previously stated that it might be an <strong><a href="http://en.wikipedia.org/wiki/Easter_egg_(media)" rel="noreferrer">Easter egg</a></strong>.</p> <p>In API 21 the implementation was changed to check if there is an installed app with the package <code>com.coffeestainstudios.goatsimulator</code></p> <pre><code>/** * Used to determine whether the user making this call is subject to * teleportations. * * &lt;p&gt;As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this method can * now automatically identify goats using advanced goat recognition technology.&lt;/p&gt; * * @return Returns true if the user making this call is a goat. */ public boolean isUserAGoat() { return mContext.getPackageManager() .isPackageAvailable("com.coffeestainstudios.goatsimulator"); } </code></pre> <p>Here is the <strong><a href="https://android.googlesource.com/platform/frameworks/base/+/android-5.0.0_r6/core/java/android/os/UserManager.java#442" rel="noreferrer">source link</a></strong></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload