Merge "Move libicuuc.so into com.android.i18n module." am: 10bad3e882
Change-Id: Id307e7102099ccd66bebff2b29fe6f11287e7594
This commit is contained in:
commit
ee913197f3
2 changed files with 21 additions and 3 deletions
|
@ -103,7 +103,7 @@ static const char* const kVendorLibDir = "/vendor/lib64";
|
|||
static const char* const kAsanSystemLibDir = "/data/asan/system/lib64";
|
||||
static const char* const kAsanOdmLibDir = "/data/asan/odm/lib64";
|
||||
static const char* const kAsanVendorLibDir = "/data/asan/vendor/lib64";
|
||||
static const char* const kArtApexLibDir = "/apex/com.android.art/lib64";
|
||||
static const char* const kI18nApexLibDir = "/apex/com.android.i18n/lib64";
|
||||
#else
|
||||
static const char* const kSystemLibDir = "/system/lib";
|
||||
static const char* const kOdmLibDir = "/odm/lib";
|
||||
|
@ -111,7 +111,7 @@ static const char* const kVendorLibDir = "/vendor/lib";
|
|||
static const char* const kAsanSystemLibDir = "/data/asan/system/lib";
|
||||
static const char* const kAsanOdmLibDir = "/data/asan/odm/lib";
|
||||
static const char* const kAsanVendorLibDir = "/data/asan/vendor/lib";
|
||||
static const char* const kArtApexLibDir = "/apex/com.android.art/lib";
|
||||
static const char* const kI18nApexLibDir = "/apex/com.android.i18n/lib";
|
||||
#endif
|
||||
|
||||
static const char* const kAsanLibDirPrefix = "/data/asan";
|
||||
|
@ -264,7 +264,7 @@ static bool translateSystemPathToApexPath(const char* name, std::string* out_nam
|
|||
|
||||
for (const char* soname : kSystemToArtApexLibs) {
|
||||
if (strcmp(base_name, soname) == 0) {
|
||||
*out_name_to_apex = std::string(kArtApexLibDir) + "/" + base_name;
|
||||
*out_name_to_apex = std::string(kI18nApexLibDir) + "/" + base_name;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -237,6 +237,24 @@ TEST(dlfcn, dlopen_from_nullptr_android_api_level_28) {
|
|||
ASSERT_TRUE(dlopen(nullptr, RTLD_NOW) != nullptr);
|
||||
}
|
||||
|
||||
// Test system path translation for backward compatibility. http://b/130219528
|
||||
TEST(dlfcn, dlopen_system_libicuuc_android_api_level_28) {
|
||||
android_set_application_target_sdk_version(28);
|
||||
ASSERT_TRUE(dlopen(PATH_TO_SYSTEM_LIB "libicuuc.so", RTLD_NOW) != nullptr);
|
||||
ASSERT_TRUE(dlopen(PATH_TO_SYSTEM_LIB "libicui18n.so", RTLD_NOW) != nullptr);
|
||||
}
|
||||
|
||||
TEST(dlfcn, dlopen_system_libicuuc_android_api_level_29) {
|
||||
android_set_application_target_sdk_version(29);
|
||||
ASSERT_TRUE(dlopen(PATH_TO_SYSTEM_LIB "libicuuc.so", RTLD_NOW) == nullptr);
|
||||
ASSERT_TRUE(dlopen(PATH_TO_SYSTEM_LIB "libicui18n.so", RTLD_NOW) == nullptr);
|
||||
}
|
||||
|
||||
TEST(dlfcn, dlopen_system_libicuuc_android_api_level_current) {
|
||||
ASSERT_TRUE(dlopen(PATH_TO_SYSTEM_LIB "libicuuc.so", RTLD_NOW) == nullptr);
|
||||
ASSERT_TRUE(dlopen(PATH_TO_SYSTEM_LIB "libicui18n.so", RTLD_NOW) == nullptr);
|
||||
}
|
||||
|
||||
TEST(dlfcn, dlopen_from_zip_absolute_path) {
|
||||
const std::string lib_zip_path = "/libdlext_test_zip/libdlext_test_zip_zipaligned.zip";
|
||||
const std::string lib_path = GetTestlibRoot() + lib_zip_path;
|
||||
|
|
Loading…
Reference in a new issue