diff options
Diffstat (limited to 'libnativeloader/public_libraries.cpp')
-rw-r--r-- | libnativeloader/public_libraries.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libnativeloader/public_libraries.cpp b/libnativeloader/public_libraries.cpp index c26b8f6bc4..53fcd2f35b 100644 --- a/libnativeloader/public_libraries.cpp +++ b/libnativeloader/public_libraries.cpp @@ -34,6 +34,7 @@ #include <log/log.h> #if defined(ART_TARGET_ANDROID) +#include <android-modules-utils/sdk_level.h> #include <android/sysprop/VndkProperties.sysprop.h> #endif @@ -426,12 +427,11 @@ const std::map<std::string, std::string>& apex_public_libraries() { bool is_product_treblelized() { #if defined(ART_TARGET_ANDROID) - // Product is not treblelized iff launching version is prior to R and - // ro.product.vndk.version is not defined - static bool product_treblelized = - !(android::base::GetIntProperty("ro.product.first_api_level", 0) < __ANDROID_API_R__ && - !android::sysprop::VndkProperties::product_vndk_version().has_value()); - return product_treblelized; + // Product is treblelized iff the sdk version is newer than U + // or launching version is R or newer or ro.product.vndk.version is defined + return android::modules::sdklevel::IsAtLeastV() || + android::base::GetIntProperty("ro.product.first_api_level", 0) >= __ANDROID_API_R__ || + android::sysprop::VndkProperties::product_vndk_version().has_value(); #else return false; #endif |