forked from https://android.googlesource.com/platform/system/core