summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJooyung Han <jooyung@google.com>2020-04-07 16:21:35 +0900
committerJooyung Han <jooyung@google.com>2020-04-10 01:42:41 +0900
commit872b061e34865b894c263aba8aa9be22879672be (patch)
tree78e6b0d0f808493ada3569a8d860fe347067b9b6
parent07b8e0653167c89c25091d5b182247fd3982291c (diff)
downloadlibhidl-872b061e34865b894c263aba8aa9be22879672be.tar.gz
Cleanup: update VNDK path
Even though the old VNDK path(/system/lib/vndk-sp-<ver>) is still valid to use (for older prebuilts), it is merely a symbolic link to VNDK APEX. As a migration effort to the new VNDK path, this change updates the VNDK path from /system/lib/vndk-sp-<ver> to /apex/com.android.vndk.v<ver>/lib Bug: 151635798 Test: atest --test-mapping . Test: device boots with Q vendor Merged-In: I7260f1a969e4c7f6923d09382eeb2efec7b6c2cd Change-Id: I7260f1a969e4c7f6923d09382eeb2efec7b6c2cd (cherry picked from commit 0268c937f268b7a6cd50571b35455adf0cf7b007)
-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 956effd..e38a664 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 0b80cd4..ee87b87 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/"