diff options
author | Jooyung Han <jooyung@google.com> | 2020-04-07 16:21:35 +0900 |
---|---|---|
committer | Jooyung Han <jooyung@google.com> | 2020-04-08 23:55:30 +0000 |
commit | 0268c937f268b7a6cd50571b35455adf0cf7b007 (patch) | |
tree | fc95c9dca57ceb8e5fb9bdafd845361d1b1825b5 | |
parent | 2f07ccd174d2639daab60506b04ff110470d03e9 (diff) | |
download | platform_system_libhidl-0268c937f268b7a6cd50571b35455adf0cf7b007.tar.gz platform_system_libhidl-0268c937f268b7a6cd50571b35455adf0cf7b007.tar.bz2 platform_system_libhidl-0268c937f268b7a6cd50571b35455adf0cf7b007.zip |
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
Change-Id: I7260f1a969e4c7f6923d09382eeb2efec7b6c2cd
-rw-r--r-- | base/HidlInternal.cpp | 12 | ||||
-rw-r--r-- | base/include/hidl/HidlInternal.h | 7 |
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/" |