diff --git a/audio/aidl/default/EffectConfig.cpp b/audio/aidl/default/EffectConfig.cpp index 1cc48978d3..a1fbefa8b9 100644 --- a/audio/aidl/default/EffectConfig.cpp +++ b/audio/aidl/default/EffectConfig.cpp @@ -93,7 +93,7 @@ std::vector> EffectConfig::ge } bool EffectConfig::resolveLibrary(const std::string& path, std::string* resolvedPath) { - if (__builtin_available(android AAPEXSUPPORT_API, *)) { + if constexpr (__ANDROID_VENDOR_API__ >= 202404) { AApexInfo *apexInfo; if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) { std::string apexName(AApexInfo_getName(apexInfo)); diff --git a/audio/aidl/default/EffectMain.cpp b/audio/aidl/default/EffectMain.cpp index ac178b6a06..a300cfdd78 100644 --- a/audio/aidl/default/EffectMain.cpp +++ b/audio/aidl/default/EffectMain.cpp @@ -29,7 +29,7 @@ static const char* kDefaultConfigName = "audio_effects_config.xml"; static inline std::string config_file_path() { - if (__builtin_available(android AAPEXSUPPORT_API, *)) { + if constexpr (__ANDROID_VENDOR_API__ >= 202404) { AApexInfo *apexInfo; if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) { std::string apexName(AApexInfo_getName(apexInfo));