Use versioned VNDK directories
VNDK directories will have "-$VER" as their suffix, where $VER is set
by the property "ro.vndk.version".
For example, if the $VER is "28", the vndk-sp directory is
"system/lib[64]/vndk-sp-28/".
Bug: 69984421
Test: Check if the apps that uses RS works without problem.
Change-Id: I24a9b0ca51f12ab5562a661761401d057d6346a0
diff --git a/cpu_ref/rsCpuScript.cpp b/cpu_ref/rsCpuScript.cpp
index cb13b11..2961321 100644
--- a/cpu_ref/rsCpuScript.cpp
+++ b/cpu_ref/rsCpuScript.cpp
@@ -161,8 +161,9 @@
// be for a source APK change or an OTA. In either case, the APK would be
// reinstalled, which would already clear the code_cache/ directory.
bool isChecksumNeeded(const char *cacheDir) {
+ static const std::string sysLibPathVndk = getVndkSysLibPath();
if ((::strcmp(SYSLIBPATH, cacheDir) == 0) ||
- (::strcmp(SYSLIBPATH_VNDK, cacheDir) == 0) ||
+ (::strcmp(sysLibPathVndk.c_str(), cacheDir) == 0) ||
(::strcmp(SYSLIBPATH_VENDOR, cacheDir) == 0))
return false;
char buf[PROP_VALUE_MAX];