Code of Android Handler, from https://android.googlesource.com/platform/frameworks/base