Add the implementation of __isOSVersionAtLeast for Android. Currently,
only the major version is checked against the API level of the platform
which is an integer. The API level is retrieved by reading the system
property ro.build.version.sdk (and optionally ro.build.version.codename
to see if the platform is released or not).
Patch by jiyong@google.com
Bug: 150860940
Bug: 134795810
Test: m
This is inconsistent with android_get_device_api_level, which returns -1 on failure instead (per https://developer.android.com/ndk/reference/group/apilevels#android_get_device_api_level). How come a different behavior was chosen here? I don't know if it's at all likely for reading this property to fail anyway, but if it does, it seems confusing for an availability check to go in the opposite direction as a manual check based on android_get_device_api_level.