diff options
| author | vichang <vichang@google.com> | 2020-05-05 11:11:30 +0000 |
|---|---|---|
| committer | vichang <vichang@google.com> | 2020-05-05 11:11:30 +0000 |
| commit | 4a48775376a4c0b180a7d32ad2cdf00bd0dca140 (patch) | |
| tree | ef0bbb1281f6d4785e60f26cb420646c83eb6f6d /libnativeloader | |
| parent | b5146a3b70b9bf15532d25d3b876354938976bc9 (diff) | |
Revert "Move ICU from ART APEX to i18n APEX"
Revert "Move v8 and libpac into i18n APEX"
Revert "Move core-icu4j into I18n APEX"
Revert "Move ICU from ART APEX into i18n APEX"
Revert "Move core-icu4j into i18n APEX"
Revert "Move libpac into i18n APEX"
Revert "Add shared library into i18n APEX and add the required s..."
Revert "Make com_android_i18n namespace visible"
Revert submission 1299494-i18nApex
Reason for revert: Breaking aosp_x86-eng on aosp-master
Reverted Changes:
I30fc3735b:Move ICU from ART APEX to i18n APEX
Icb7e98b5c:Calling @IntraCoreApi from core-icu4j should not c...
Ic7de63fe3:Move core-icu4j into I18n APEX
I65b97bdba:Make com_android_i18n namespace visible
Ia4c83bc15:Move v8 and libpac into i18n APEX
I10e6d4948:Move core-icu4j into i18n APEX
I8d989cad7:Move ICU from ART APEX into i18n APEX
I72216ca12:Move ICU into i18n APEX
Ief9dace85:Add shared library into i18n APEX and add the requ...
I7d97a10ba:Move libpac into i18n APEX
I90fff9c55:Move ICU from ART APEX into i18n APEX
Change-Id: I516a8d290e3a3cc2b45d71ba5400364b0478a57a
Diffstat (limited to 'libnativeloader')
| -rw-r--r-- | libnativeloader/README.md | 2 | ||||
| -rw-r--r-- | libnativeloader/library_namespaces.cpp | 10 | ||||
| -rw-r--r-- | libnativeloader/native_loader_test.cpp | 9 | ||||
| -rw-r--r-- | libnativeloader/public_libraries.cpp | 24 | ||||
| -rw-r--r-- | libnativeloader/public_libraries.h | 1 |
5 files changed, 7 insertions, 39 deletions
diff --git a/libnativeloader/README.md b/libnativeloader/README.md index c5ace61ba5..57b90019e3 100644 --- a/libnativeloader/README.md +++ b/libnativeloader/README.md @@ -34,7 +34,7 @@ libraries. As the platform is getting modularized with [APEX](https://android.googlesource.com/platform/system/apex/+/refs/heads/master/docs/README.md), some libraries are no longer provided from platform, but from the APEXes which have their own linker namespaces. For example, ICU libraries `libicuuc.so` and -`libicui18n.so` are from the I18n APEX. +`libicui18n.so` are from the runtime APEX. The list of public native libraries is not static. The default set of libraries are defined in AOSP, but partners can extend it to include their own libraries. diff --git a/libnativeloader/library_namespaces.cpp b/libnativeloader/library_namespaces.cpp index 14ba721420..d42a4b55ed 100644 --- a/libnativeloader/library_namespaces.cpp +++ b/libnativeloader/library_namespaces.cpp @@ -51,7 +51,6 @@ constexpr const char* kVendorNamespaceName = "sphal"; constexpr const char* kVndkNamespaceName = "vndk"; constexpr const char* kVndkProductNamespaceName = "vndk_product"; constexpr const char* kArtNamespaceName = "com_android_art"; -constexpr const char* kI18nNamespaceName = "com_android_i18n"; constexpr const char* kNeuralNetworksNamespaceName = "com_android_neuralnetworks"; constexpr const char* kStatsdNamespaceName = "com_android_os_statsd"; @@ -273,15 +272,6 @@ Result<NativeLoaderNamespace*> LibraryNamespaces::Create(JNIEnv* env, uint32_t t } } - auto i18n_ns = NativeLoaderNamespace::GetExportedNamespace(kI18nNamespaceName, is_bridged); - // i18n APEX does not exist on host, and under certain build conditions. - if (i18n_ns.ok()) { - linked = app_ns->Link(*i18n_ns, i18n_public_libraries()); - if (!linked.ok()) { - return linked.error(); - } - } - // Give access to NNAPI libraries (apex-updated LLNDK library). auto nnapi_ns = NativeLoaderNamespace::GetExportedNamespace(kNeuralNetworksNamespaceName, is_bridged); diff --git a/libnativeloader/native_loader_test.cpp b/libnativeloader/native_loader_test.cpp index e64e1a518c..66d7531b35 100644 --- a/libnativeloader/native_loader_test.cpp +++ b/libnativeloader/native_loader_test.cpp @@ -97,7 +97,7 @@ class Platform { static std::unordered_map<std::string, Platform::mock_namespace_handle> namespaces = { {"system", TO_MOCK_NAMESPACE(TO_ANDROID_NAMESPACE("system"))}, {"default", TO_MOCK_NAMESPACE(TO_ANDROID_NAMESPACE("default"))}, - {"com_android_i18n", TO_MOCK_NAMESPACE(TO_ANDROID_NAMESPACE("com_android_i18n"))}, + {"com_android_art", TO_MOCK_NAMESPACE(TO_ANDROID_NAMESPACE("com_android_art"))}, {"sphal", TO_MOCK_NAMESPACE(TO_ANDROID_NAMESPACE("sphal"))}, {"vndk", TO_MOCK_NAMESPACE(TO_ANDROID_NAMESPACE("vndk"))}, {"vndk_product", TO_MOCK_NAMESPACE(TO_ANDROID_NAMESPACE("vndk_product"))}, @@ -355,7 +355,6 @@ class NativeLoaderTest_Create : public NativeLoaderTest { std::string expected_parent_namespace = "system"; bool expected_link_with_platform_ns = true; bool expected_link_with_art_ns = true; - bool expected_link_with_i18n_ns = true; bool expected_link_with_sphal_ns = !vendor_public_libraries().empty(); bool expected_link_with_vndk_ns = false; bool expected_link_with_vndk_product_ns = false; @@ -364,7 +363,6 @@ class NativeLoaderTest_Create : public NativeLoaderTest { bool expected_link_with_statsd_ns = true; std::string expected_shared_libs_to_platform_ns = default_public_libraries(); std::string expected_shared_libs_to_art_ns = art_public_libraries(); - std::string expected_shared_libs_to_i18n_ns = i18n_public_libraries(); std::string expected_shared_libs_to_sphal_ns = vendor_public_libraries(); std::string expected_shared_libs_to_vndk_ns = vndksp_libraries_vendor(); std::string expected_shared_libs_to_vndk_product_ns = vndksp_libraries_product(); @@ -395,11 +393,6 @@ class NativeLoaderTest_Create : public NativeLoaderTest { StrEq(expected_shared_libs_to_art_ns))) .WillOnce(Return(true)); } - if (expected_link_with_i18n_ns) { - EXPECT_CALL(*mock, mock_link_namespaces(Eq(IsBridged()), _, NsEq("com_android_i18n"), - StrEq(expected_shared_libs_to_i18n_ns))) - .WillOnce(Return(true)); - } if (expected_link_with_sphal_ns) { EXPECT_CALL(*mock, mock_link_namespaces(Eq(IsBridged()), _, NsEq("sphal"), StrEq(expected_shared_libs_to_sphal_ns))) diff --git a/libnativeloader/public_libraries.cpp b/libnativeloader/public_libraries.cpp index 575ce2d3ac..7bb5a1fde2 100644 --- a/libnativeloader/public_libraries.cpp +++ b/libnativeloader/public_libraries.cpp @@ -57,15 +57,12 @@ constexpr const char* kLlndkLibrariesFile = "/apex/com.android.vndk.v{}/etc/llnd constexpr const char* kVndkLibrariesFile = "/apex/com.android.vndk.v{}/etc/vndksp.libraries.{}.txt"; const std::vector<const std::string> kArtApexPublicLibraries = { - "libnativehelper.so", -}; - -const std::vector<const std::string> ki18nApexPublicLibraries = { "libicuuc.so", "libicui18n.so", + "libnativehelper.so", }; -constexpr const char* kI18nApexLibPath = "/apex/com.android.i18n/" LIB; +constexpr const char* kArtApexLibPath = "/apex/com.android.art/" LIB; constexpr const char* kNeuralNetworksApexPublicLibrary = "libneuralnetworks.so"; @@ -198,14 +195,14 @@ static std::string InitDefaultPublicLibraries(bool for_preload) { return android::base::Join(*sonames, ':'); } - // Remove the public libs in the i18n namespace. + // Remove the public libs in the art namespace. // These libs are listed in public.android.txt, but we don't want the rest of android // in default namespace to dlopen the libs. // For example, libicuuc.so is exposed to classloader namespace from art namespace. // Unfortunately, it does not have stable C symbols, and default namespace should only use // stable symbols in libandroidicu.so. http://b/120786417 - for (const std::string& lib_name : ki18nApexPublicLibraries) { - std::string path(kI18nApexLibPath); + for (const std::string& lib_name : kArtApexPublicLibraries) { + std::string path(kArtApexLibPath); path.append("/").append(lib_name); struct stat s; @@ -240,12 +237,6 @@ static std::string InitArtPublicLibraries() { return list; } -static std::string InitI18nPublicLibraries() { - static_assert(sizeof(ki18nApexPublicLibraries) > 0, "ki18nApexPublicLibraries is empty"); - std::string list = android::base::Join(ki18nApexPublicLibraries, ":"); - return list; -} - static std::string InitVendorPublicLibraries() { // This file is optional, quietly ignore if the file does not exist. auto sonames = ReadConfig(kVendorPublicLibrariesFile, always_true); @@ -358,11 +349,6 @@ const std::string& art_public_libraries() { return list; } -const std::string& i18n_public_libraries() { - static std::string list = InitI18nPublicLibraries(); - return list; -} - const std::string& vendor_public_libraries() { static std::string list = InitVendorPublicLibraries(); return list; diff --git a/libnativeloader/public_libraries.h b/libnativeloader/public_libraries.h index b60a2ef399..9b8b2a4705 100644 --- a/libnativeloader/public_libraries.h +++ b/libnativeloader/public_libraries.h @@ -36,7 +36,6 @@ const std::string& art_public_libraries(); const std::string& statsd_public_libraries(); const std::string& vendor_public_libraries(); const std::string& extended_public_libraries(); -const std::string& i18n_public_libraries(); const std::string& neuralnetworks_public_libraries(); const std::string& llndk_libraries_product(); const std::string& llndk_libraries_vendor(); |
