Move libicuuc.so into com.android.i18n module.
Change the location set in the linker
Bug: 130219528
Bug: 138994281
Test: atest CtsBionicTestCases
Test: atest CtsJniTestCases
Change-Id: I215a8e023ccc4d5ffdd7df884c809f8d12050c8f
diff --git a/tests/dlext_test.cpp b/tests/dlext_test.cpp
index 293c17b..1139e53 100644
--- a/tests/dlext_test.cpp
+++ b/tests/dlext_test.cpp
@@ -237,6 +237,24 @@
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;