Jokes and Humour in the Public Android API

2025-06-160:14286167voxelmanip.se

Previously I have covered a relatively obscure now-removed placeholder string in Android that doubles as an easter egg, the fictitious carrier by the name of El Telco Loco. But this time it is about…

Screenshot of a page on the Android developer reference website. The screenshot shows the documentation for a constant by the name of DISALLOW_FUN, which is gone over later in the blog post.

Previously I have covered a relatively obscure now-removed placeholder string in Android that doubles as an easter egg, the fictitious carrier by the name of El Telco Loco. But this time it is about methods and other parts of the publicly facing Android API that may generally be more humourous than they are useful. Easter eggs, jokes, whatever you want to call them, that are visible to Android app developers rather than regular users.

ActivityManager.isUserAMonkey()

(reference)

While it may initially look like a joke when it’s described as returning true if the UI is “currently being messed with by a monkey” without any further elaboration in the documentation, this is probably the one in the list with the most usefulness attached to it.

It is referring to the UI Exerciser Monkey, which is a developer tool for Android that simulates random sequences of user input in order to stress-test apps. So this method will return a boolean of whether the Monkey is currently running or not.

The introduction of such a method to detect the usage of the Monkey appears to have an origin in something that happened during Android’s development, as per a quote from the book Androids: The Team that Built the Android Operating System:

One day I walked into the monkey lab to hear a voice say, ‘911 -What’s your emergency?” That situation resulted in Dianne adding a new function to the API, isUserAMonkey() which is used to gate actions that monkeys shouldn’t take during tests (including dialing the phone and resetting the device).

Indeed, when feeding random and inherently unpredictable input into an app, you would want to have some way of locking away portions of an app that may have unintended real-world consequences such as calling emergency services. As such, isUserAMonkey was implemented and later made its way into the public API in Android 2.2 Froyo (API 8).

UserManager.isUserAGoat()

(reference)

This one is more of a joke. The developer documentation says it is “used to determine whether the user making this call is subject to teleportations”, which in itself is likely a reference to a hidden column in the Chrome task manager that shows how many goats a browser process has teleported.

It was first introduced in Android 4.2 (API 17), and originally just returned false. However in Android 5.0 Lollipop (API 21) it was changed to “automatically identify goats using advanced goat recognition technology”. The game Goat Simulator had released earlier that year and was made available for Android in September during Lollipop’s development, so this method was changed to instead detect the presence of the Android version of Goat Simulator being installed on the device:

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

Later in Android 11 (API 30), it was changed such that apps targetting API 30 and above will once again always return false when the method is called. According to the developer documentation this was made to “protect goat privacy”.

if (mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R) { return false;
}

Android 11 is also the version where the QUERY_ALL_PACKAGES permission was introduced, meaning that apps targetting Android 11 would not be able to query for information of other apps through the PackageManager without this permission. So it makes sense to also wall off this method in order to not leak any information about other apps installed on an user’s device, even as a joke.

UserManager.DISALLOW_FUN

(reference)

This constant refers to a device policy added in Android 6 Marshmallow (API 23) which restricts the user from having “fun”. The description given in the developer documentation is, ironically, amusing and reminds me of something GLaDOS would probably say:

Specifies if the user is not allowed to have fun. In some cases, the device owner may wish to prevent the user from experiencing amusement or joy while using the device.

This is in fact a real device policy that a device owner may change to restrict what users of the device is able to do with it. And third-parties can then hook into this to disable features of their app that are deemed “too fun”. I don’t know if any third-party apps actually make use of it, but in the Android system it is used to disable the Android version easter egg that shows up when pressing the version label in the settings.

Considering that “fun” easter eggs like the Google Chrome “No internet” Dinosaur minigame end up being distractions that e.g. schools want to disable for enrolled devices (see Chromium issue #41159706), maybe the Android version easter egg could very much be a distraction depending on the version.

Chronometer.isTheFinalCountdown()

(reference)

The Chronometer class had a new method by the name of isTheFinalCountdown added to it in Android 8 Oreo (API 26). When called, it will send an Intent to open the YouTube video for The Final Countdown by Europe.

No really. That’s what it does:

try { getContext().startActivity( new Intent(Intent.ACTION_VIEW, Uri.parse("https://youtu.be/9jK-NcRmVcw")) .addCategory(Intent.CATEGORY_BROWSABLE) .addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT | Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT)); return true;
} catch (Exception e) { return false;
}

Marvelous.

PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND

(reference)

This constant was added in Android 2.3 Gingerbread (API 8) and is used to describe a device that supports tracking 5 simultaneous touch inputs, with the name being a reference to Jazz hands.

Log.wtf()

(reference)

According to the developer documentation, WTF stands for “What a Terrible Failure” (sure…), and is intended to log things that should never happen. It logs the message at the assertion level.

AdapterViewFlipper.fyiWillBeAdvancedByHostKThx()

(reference)

This is a method with an oddly humourous informal name, which was likely caused by some developer coming up blank on naming it and has now ended up in the public Android API, being added in Android 3.0 Honeycomb (API 11). It gets called by an AppWidgetHost when advancing the views inside of the AdapterViewFlipper object.

Indeed, naming things is one of the two hard problems in computer science, the other being off-by-one errors and cache invalidation.

IBinder.TWEET_TRANSACTION

(reference)

The Android Binder system is used for performing IPC and transactions are distinguished using different types, one of them being… TWEET_TRANSACTION. It was added in Android 3.2 Honeycomb (API 13) and claims to be used to send a tweet to a target object.

It does not actually do anything, let alone send a tweet. The document mentions that messages have a limit of 130 characters, referencing Twitter’s old message character limit.

IBinder.LIKE_TRANSACTION

(reference)

In a similar fashion, a new transaction type by the name of LIKE_TRANSACTION was added in Android 4.0.3 ICS (API 15). It’s used to tell an app that the caller likes it, there is no counter to keep track of the amount of likes but it is claimed that sending such transactions will improve the app’s self-esteem.

SensorManager.SENSOR_TRICORDER

(reference)

I do have to admit I didn’t know what a Tricorder is, but it appears to be a fictional device from Star Trek and the constant was “added” in Android 1.0 (meaning it likely was present since before Android’s first official release).

The SENSOR_* constants in SensorManager have since then been deprecated in API level 15 in favour of the Sensor class, which does not include any equivalent reference to the Tricorder. Unfortunate.

SensorManager.GRAVITY_*

(reference)

The SensorManager class has a lot of constants which store the gravitational velocity of various bodies in our solar system ranging from GRAVITY_SUN to GRAVITY_PLUTO. While whether any of these outside of GRAVITY_EARTH is useful in any real-world scenarios is debatable, there are some that are actually just jokes.

GRAVITY_DEATH_STAR_I stores the gravity of the first Death Star in SI units (referred to as Empire units). This appears to be a Star Wars reference.

GRAVITY_THE_ISLAND stores the gravity of “the island”. Apparently this is a reference to The Island in the 2004 TV show Lost.

Last one, and this one is particularly crazy. Did you know there is a hidden tag inside the Android view layout system by the name of <blink>? Because that is a thing:

// [TAG_1995 = "blink"]
if (name.equals(TAG_1995)) { // Let's party like it's 1995! return new BlinkLayout(context, attrs);
}

It makes any children that is wrapped inside of it blink, like the old <blink> HTML tag. This one appears to be completely undocumented in the Android Developer reference, but was added in a commit in 2011 with the title “Improve LayoutInflater’s compliance” (right…) and is still present in the AOSP master branch.

Whether you should actually use it is debatable however.

Donations

Did you find the blog post to be informative, amusing or otherwise interesting? All blog posts are written by a human who would appreciate a donation if you got some value out of this piece of writing.


Read the original article

Comments

  • By coxley 2025-06-1612:442 reply

    For many years at FB, suffixing dangerous or really-deprecated tokens with `_DO_NOT_USE_OR_YOU_WILL_BE_FIRED` was the standard. Everyone[^1] was in on the joke.

    In the middle of the pandemic when ~50% of the workforce had started post-2020, it and other things became complaints for causing fear/uncertainty. We didn't do the best job on-boarding remote people and making them feel part of the culture at that time.

    [^1]: It was a big company so this statement could only be true in the circles I had access to.

    • By otras 2025-06-1614:412 reply

      I remember seeing this in React's __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, and I've always enjoyed similar lighthearted and unwieldingly-long names.

      Unfortunately I see it too has fallen victim to defunnification: https://github.com/facebook/react/pull/28789

      • By shkkmo 2025-06-1614:591 reply

        Fun names are OK, but only if they don't introduce ambiguity. In this case the change wasn't so much anti-fun as anti-ambiguity.

        • By otras 2025-06-1615:311 reply

          That's a great call-out, and it (along with the change itself) underlines the importance of not letting fun get in the way of actual engineering improvements. Defunnification as a side effect, if you will.

          • By serial_dev 2025-06-1619:43

            That variable name is still confusing.

      • By furyofantares 2025-06-1621:39

        Could have added a futurama reference to it

        __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_______OUT_OF_A_CANNON___INTO_THE_SUN

    • By beder 2025-06-1620:04

      At one point at Google, there was a huge chunk of code that was hard to understand, probably at the wrong place in the network stack, and stubbornly hard to change. And it kept growing, despite our efforts. We renamed it "[Foo]Sorcery" (this was about 10 years ago); people stopped trying to add to it, and periodically someone would come in and remove parts of it, all thanks (I think) to the goofy (and somewhat scary) name.

  • By Aransentin 2025-06-168:46

    For X11, from the top of my head:

    The global variable that toggles a bunch of legacy cruft is called "party_like_its_1989": https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/di...

    The changelog for the DRI2 extension is "Awesomeness!", "True excellence", "Enlightenment attained" etc: https://www.x.org/releases/X11R7.7/doc/dri2proto/dri2proto.t...

  • By agildehaus 2025-06-167:204 reply

    Reminds me of BeOS (and now Haiku), which have "is_computer_on()" and "is_computer_on_fire()" both with great descriptions.

    https://www.haiku-os.org/legacy-docs/bebook/TheKernelKit_Sys...

    • By vintagedave 2025-06-168:32

      Reminds me of Delphi -- it has an exception 'EProgrammerNotFound'.

      https://docwiki.embarcadero.com/Libraries/Athens/en/System.S...

      With a completely serious (though short) documentation page I read as very, very dry humour.

    • By throw74848484 2025-06-168:282 reply

      I know it is trying to be funny. But those states are quite normal in modern computer with advanced power management. OS should handle wakeups from deep sleep, or state where temperature of motherboard is 200 celsius.

      • By mordae 2025-06-168:311 reply

        Unlikely. Nothing is specced beyond 140 Celsius and many parts not beyond 80.

        • By kxndnddn 2025-06-1614:151 reply

          That statement is far too general and also factually wrong e.g. HT83C51 is specced for operating temperatures of 225 deg Celsius

          • By AlotOfReading 2025-06-1614:51

            That's still not a chip where an OS would have to handle motherboard temperatures of 200C, like the original point though. An 8051 is going to be running bare metal. TI has some stuff in the C2000 line that can run FreeRTOS at 200C, but the overwhelmingly vast majority of chips on the market are rated to 150C max.

      • By account42 2025-06-178:11

        Sleep / hibernate doesn't change anything here - if the computer is in those states, no code is running so it doesn't make sense to query for it, which is the joke. The function isn't called was_computer_running().

      • By tomn 2025-06-1613:56

        looking around a bit, it's used as an example in the documentation:

        https://github.com/haiku/haiku/blob/7d07c4bc739dbf90159a5c02...

        This is actually a great reason to keep it around; it's as simple as possible, and nothing uses it so it's easy to find the relevant bits of code.

      • By vjvjvjvjghv 2025-06-1619:49

        Makes sense:

        is_computer_on() int32 is_computer_on(); Returns 1 if the computer is on. If the computer isn't on, the value returned by this function is undefined.

    • By rkagerer 2025-06-1620:25

      The latter missed a golden opportunity to be some kind of async event-based trigger.

HackerNews