Stop using the __ANDROID_API_x__ constants.
Historically we've made a few mistakes where they haven't matched the
right number. And most non-Googlers are much more familiar with the
numbers, so it seems to make sense to rely more on them. Especially in
header files, which we actually expect real people to have to read from
time to time.
Test: treehugger
Change-Id: I0d4a97454ee108de1d32f21df285315c5488d886
diff --git a/libc/bionic/pthread_internal.cpp b/libc/bionic/pthread_internal.cpp
index 6fddefe..e091158 100644
--- a/libc/bionic/pthread_internal.cpp
+++ b/libc/bionic/pthread_internal.cpp
@@ -100,8 +100,8 @@
}
}
- // Historically we'd return null, but
- if (android_get_application_target_sdk_version() >= __ANDROID_API_O__) {
+ // Historically we'd return null, but from API level 26 we catch this error.
+ if (android_get_application_target_sdk_version() >= 26) {
if (thread == nullptr) {
// This seems to be a common mistake, and it's relatively harmless because
// there will never be a valid thread at address 0, whereas other invalid