summaryrefslogtreecommitdiff
path: root/libs/ui/Gralloc5.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ui/Gralloc5.cpp')
-rw-r--r--libs/ui/Gralloc5.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/ui/Gralloc5.cpp b/libs/ui/Gralloc5.cpp
index 2143f79f11..c9ec036186 100644
--- a/libs/ui/Gralloc5.cpp
+++ b/libs/ui/Gralloc5.cpp
@@ -23,6 +23,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,7 +91,7 @@ static void *loadIMapperLibrary() {
}
void* so = nullptr;
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if API_LEVEL_AT_LEAST (__ANDROID_API_V__, 202404) {
so = AServiceManager_openDeclaredPassthroughHal("mapper", mapperSuffix.c_str(),
RTLD_LOCAL | RTLD_NOW);
} else {