|
30 | 30 | #include <android/binder_auto_utils.h> |
31 | 31 | #include <android/binder_ibinder.h> |
32 | 32 |
|
33 | | -#if defined(__ANDROID_VENDOR_API__) |
34 | | -#include <android/llndk-versioning.h> |
35 | | -#elif !defined(API_LEVEL_AT_LEAST) |
36 | 33 | #if defined(__BIONIC__) |
37 | | -#define API_LEVEL_AT_LEAST(sdk_api_level, vendor_api_level) \ |
38 | | - (__builtin_available(android sdk_api_level, *)) |
| 34 | +#define API_LEVEL_AT_LEAST(sdk_api_level) __builtin_available(android sdk_api_level, *) |
| 35 | +#elif defined(TRUSTY_USERSPACE) |
| 36 | +// TODO(b/349936395): set to true for Trusty |
| 37 | +#define API_LEVEL_AT_LEAST(sdk_api_level) (false) |
39 | 38 | #else |
40 | | -#define API_LEVEL_AT_LEAST(sdk_api_level, vendor_api_level) (true) |
| 39 | +#define API_LEVEL_AT_LEAST(sdk_api_level) (true) |
41 | 40 | #endif // __BIONIC__ |
42 | | -#endif // __ANDROID_VENDOR_API__ |
43 | 41 |
|
44 | 42 | #if __has_include(<android/binder_shell.h>) |
45 | 43 | #include <android/binder_shell.h> |
@@ -298,9 +296,8 @@ AIBinder_Class* ICInterface::defineClass(const char* interfaceDescriptor, |
298 | 296 | #endif |
299 | 297 |
|
300 | 298 | #if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__) || __ANDROID_API__ >= 36 |
301 | | - if API_LEVEL_AT_LEAST (36, 202504) { |
302 | | - if (codeToFunction != nullptr && |
303 | | - (&AIBinder_Class_setTransactionCodeToFunctionNameMap != nullptr)) { |
| 299 | + if (API_LEVEL_AT_LEAST(36)) { |
| 300 | + if (codeToFunction != nullptr) { |
304 | 301 | AIBinder_Class_setTransactionCodeToFunctionNameMap(clazz, codeToFunction, |
305 | 302 | functionCount); |
306 | 303 | } |
|
0 commit comments