Android API Level 17(Android 4.2)以降では、ユーザがテレポーテーション対象のヤギ(Goat)か否かを返す関数 UserManager.isUserAGoat が提供される。*1
- API Level 17〜20:常に
false
を返す。 - API Level 21(Android 5.0)以降:
高度なヤギ認識技術(advanced goat recognition technology)を用いて、ゲーム "Goat Simulator" がインストールされている場合に限りtrue
を返す。
public boolean isUserAGoat()
Used to determine whether the user making this call is subject to teleportations.
As of LOLLIPOP, this method can now automatically identify goats using advanced goat recognition technology.Returns:
UserManager.isUserAGoat
boolean
: Returns true if the user making this call is a goat.
関連URL
- java - Proper use cases for Android UserManager.isUserAGoat()? - Stack Overflow
- https://github.com/android/platform_frameworks_base/blob/android-cts-4.2_r1/core/java/android/os/UserManager.java#L77-L84
- https://github.com/android/platform_frameworks_base/blob/android-cts-5.0_r3/core/java/android/os/UserManager.java#L433-L445
- ActivityManager.isUserAMonkey
*1:WebブラウザChromeにもテレポートされたヤギ(Goats Teleported)ネタがある。Google社はヤギのテレポーテーションがお好き?公式ブログ記事 "Mowing with goats", "The goats are baaaahk!" 参照