summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-04-09 00:12:55 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-04-09 00:12:55 +0000
commit178660e3d2f6aa83fe9770d05fdc0d59d0d482dc (patch)
treedd6f26ae329b71bcc1104c804a53dae1494a4ce7
parent27d43ebffd70d680e738b9586e947fecc454865c (diff)
parent0268c937f268b7a6cd50571b35455adf0cf7b007 (diff)
downloadplatform_system_libhidl-178660e3d2f6aa83fe9770d05fdc0d59d0d482dc.tar.gz
platform_system_libhidl-178660e3d2f6aa83fe9770d05fdc0d59d0d482dc.tar.bz2
platform_system_libhidl-178660e3d2f6aa83fe9770d05fdc0d59d0d482dc.zip
Merge "Cleanup: update VNDK path" into rvc-dev
-rw-r--r--base/HidlInternal.cpp12
-rw-r--r--base/include/hidl/HidlInternal.h7
2 files changed, 4 insertions, 15 deletions
diff --git a/base/HidlInternal.cpp b/base/HidlInternal.cpp
index 956effdf..e38a664a 100644
--- a/base/HidlInternal.cpp
+++ b/base/HidlInternal.cpp
@@ -51,17 +51,7 @@ void logAlwaysFatal(const char* message) {
}
std::string getVndkVersionStr() {
- static std::string vndkVersion("0");
- // "0" means the vndkVersion must be initialized with the property value.
- // Otherwise, return the value.
- if (vndkVersion == "0") {
- vndkVersion = base::GetProperty("ro.vndk.version", "");
- if (vndkVersion != "" && vndkVersion != "current") {
- vndkVersion = "-" + vndkVersion;
- } else {
- vndkVersion = "";
- }
- }
+ static std::string vndkVersion = base::GetProperty("ro.vndk.version", "");
return vndkVersion;
}
diff --git a/base/include/hidl/HidlInternal.h b/base/include/hidl/HidlInternal.h
index 0b80cd49..ee87b87c 100644
--- a/base/include/hidl/HidlInternal.h
+++ b/base/include/hidl/HidlInternal.h
@@ -44,8 +44,7 @@ struct bs_tag {};
//to avoid creating dependencies on liblog.
void logAlwaysFatal(const char *message);
-// Returns vndk version from "ro.vndk.version" with '-' as a prefix.
-// If "ro.vndk.version" is not set or set to "current", it returns empty string.
+// Returns vndk version from "ro.vndk.version"
std::string getVndkVersionStr();
// Explicitly invokes the parameterized element's destructor;
@@ -115,11 +114,11 @@ private:
};
#define HAL_LIBRARY_PATH_SYSTEM_64BIT "/system/lib64/hw/"
-#define HAL_LIBRARY_PATH_VNDK_SP_64BIT_FOR_VERSION "/system/lib64/vndk-sp%s/hw/"
+#define HAL_LIBRARY_PATH_VNDK_SP_64BIT_FOR_VERSION "/apex/com.android.vndk.v%s/lib64/hw/"
#define HAL_LIBRARY_PATH_VENDOR_64BIT "/vendor/lib64/hw/"
#define HAL_LIBRARY_PATH_ODM_64BIT "/odm/lib64/hw/"
#define HAL_LIBRARY_PATH_SYSTEM_32BIT "/system/lib/hw/"
-#define HAL_LIBRARY_PATH_VNDK_SP_32BIT_FOR_VERSION "/system/lib/vndk-sp%s/hw/"
+#define HAL_LIBRARY_PATH_VNDK_SP_32BIT_FOR_VERSION "/apex/com.android.vndk.v%s/lib/hw/"
#define HAL_LIBRARY_PATH_VENDOR_32BIT "/vendor/lib/hw/"
#define HAL_LIBRARY_PATH_ODM_32BIT "/odm/lib/hw/"