Android codebase easter eggs

ailelame

FOLMER Thomas

Posted on January 16, 2023

Android codebase easter eggs

(Image by the Olloweb agency on Unsplash)

The Android codebase is full of surprises that we have yet to discover.
Recently, I came across a presentation of the weird property DISALLOW_FUN in the UserManager, and it made me want to look for the other easter eggs, pranks and small jokes hidden in the Android codebase.
Without further ado !

Interrogation Gif

Android easter eggs

The first thing that should come to mind when speaking of easter eggs in Android, is the one that can be found for every Android Version since 2.3
Easily accessible to even non-developers, just go to Settings -> About Phone -> Repeatedly tap on the Android version
Find all the version easters eggs here

UserManager

In the code, the UserManager is probably the go-to place to hide curiosities.

Might your users be subject to teleportation ? I have something for you ! isUserAGoat()

isUserAGoat()

Unleash the power of your code with Android's advanced goat recognition technology and please, respect the goat's privacy.

And who says that the goats cannot have fun?

You'll be able to control the fun of your user with DISALLOW_FUN

Screenshot of the android codebase for DISALLOW_FUN

As we can see, the fun is disabled for our users by default. I invite Android Developers to repair this mischief and turn on the fun for all your users.
It is our responsibility to make the world a better place.

Ready for space

If you could not make the world a better place with DISALLOW_FUN, time to build a Death Star !
Luckily Android can help us by providing the expected gravity of the Death Star.
Use the Sensor Manager and use the GRAVITY_DEATH_STAR_I
Seems important as they added it in the very first API...

WTF

Are you having a long day ? Have you been scratching your head for too long about weird behaviors ?
Just release pressure and place some WTF on your code :
Log.wtf()
WTF -> "What a terrible Failure"

The jazzman

You app will be used by very agile users and you need to handle multiple clicks at the same time, FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND is for you !
Nice touch, Android ;)

Cats and developers

What would be the internet and by extension the developers without cats?!
I found >200 files containing meow in the source of android. -> https://cs.android.com/search?q=Meow

The final countdown

What better way to close this article than the final countdown?!
Using Chronometer(context).isTheFinalCountDown() will launch youtube and play... The final countdown !

Final countdown codebase

Sources :
Android source code explorer
https://cs.android.com

The final countdown
https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/android/widget/Chronometer.java;l=163;bpv=1;bpt=1?q=finalcountdown

Most of the inspiration come from this article
https://blog.danlew.net/2015/04/18/is-your-user-a-goat/

💖 💪 🙅 🚩
ailelame
FOLMER Thomas

Posted on January 16, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Dans les mystères du code d'Android
android Dans les mystères du code d'Android

January 23, 2023

Android codebase easter eggs
android Android codebase easter eggs

January 16, 2023