diff options
author | 2024-03-19 13:01:43 +0900 | |
---|---|---|
committer | 2024-03-19 18:54:23 +0900 | |
commit | 404dbf21bb31bf737808def627d03b37445b9f23 (patch) | |
tree | 92fd9fd3d544353e4a5088c417b09fc6e3616204 /libs/ui/Gralloc5.cpp | |
parent | a0141af9f6dfc5c9dfb6995dadc9c8c33920ba85 (diff) |
Include llndk-versioning.h for LLNDK versioning.
llndk-versioning.h provides __INTRODUCED_IN_LLNDK and
API_LEVEL_AT_LEAST macros. But this header is not availabel in NDK
build. It must be included conditionally for the NDK headers.
Bug: 302113279
Test: build trunk-staging and next configurations
Change-Id: I3294ff7f27ad9baaabd4a76f3f4faa10fe2d8f49
Diffstat (limited to 'libs/ui/Gralloc5.cpp')
-rw-r--r-- | libs/ui/Gralloc5.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ui/Gralloc5.cpp b/libs/ui/Gralloc5.cpp index 25850f71cb..303043a35a 100644 --- a/libs/ui/Gralloc5.cpp +++ b/libs/ui/Gralloc5.cpp @@ -22,6 +22,7 @@ #include <aidlcommonsupport/NativeHandle.h> #include <android/binder_manager.h> #include <android/hardware/graphics/mapper/utils/IMapperMetadataTypes.h> +#include <android/llndk-versioning.h> #include <binder/IPCThreadState.h> #include <dlfcn.h> #include <ui/FatVector.h> @@ -90,8 +91,7 @@ static void *loadIMapperLibrary() { void* so = nullptr; // TODO(b/322384429) switch this to __ANDROID_API_V__ when V is finalized - // TODO(b/302113279) use __ANDROID_VENDOR_API__ for vendor variant - if (__builtin_available(android __ANDROID_API_FUTURE__, *)) { + if API_LEVEL_AT_LEAST(__ANDROID_API_FUTURE__, 202404) { so = AServiceManager_openDeclaredPassthroughHal("mapper", mapperSuffix.c_str(), RTLD_LOCAL | RTLD_NOW); } else { |