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
diff --git a/Android.mk b/Android.mk
index 0228b86..5ae5881 100644
--- a/Android.mk
+++ b/Android.mk
@@ -503,6 +503,7 @@
 
 PRIVATE_ART_APEX_DEPENDENCY_LIBS := \
   lib/libadbconnection.so \
+  lib/libandroidicu.so \
   lib/libandroidio.so \
   lib/libartbase.so \
   lib/libart-compiler.so \
@@ -519,6 +520,9 @@
   lib/libdt_fd_forward.so \
   lib/libdt_socket.so \
   lib/libexpat.so \
+  lib/libicui18n.so \
+  lib/libicu_jni.so \
+  lib/libicuuc.so \
   lib/libjavacore.so \
   lib/libjdwp.so \
   lib/liblzma.so \
@@ -539,6 +543,7 @@
   lib/libziparchive.so \
   lib/libz.so \
   lib64/libadbconnection.so \
+  lib64/libandroidicu.so \
   lib64/libandroidio.so \
   lib64/libartbase.so \
   lib64/libart-compiler.so \
@@ -555,6 +560,9 @@
   lib64/libdt_fd_forward.so \
   lib64/libdt_socket.so \
   lib64/libexpat.so \
+  lib64/libicui18n.so \
+  lib64/libicu_jni.so \
+  lib64/libicuuc.so \
   lib64/libjavacore.so \
   lib64/libjdwp.so \
   lib64/liblzma.so \
@@ -583,16 +591,6 @@
   lib64/libjavacrypto.so \
   lib64/libssl.so \
 
-PRIVATE_I18N_APEX_DEPENDENCY_LIBS := \
-  lib/libandroidicu.so \
-  lib/libicui18n.so \
-  lib/libicu_jni.so \
-  lib/libicuuc.so \
-  lib64/libandroidicu.so \
-  lib64/libicui18n.so \
-  lib64/libicu_jni.so \
-  lib64/libicuuc.so \
-
 # Generate copies of Bionic bootstrap artifacts and ART APEX
 # libraries in the `system` (TARGET_OUT) directory. This is dangerous
 # as these files could inadvertently stay in this directory and be
@@ -612,7 +610,7 @@
 #   `$(TARGET_OUT)/../apex/com.android.art.debug` (the local
 #   directory under the build tree containing the (Debug) ART APEX
 #   artifacts, which is not sync'd to the target).
-# - Libraries from the Conscrypt and I18n APEX may be loaded during golem runs.
+# - Libraries from the Conscrypt APEX may be loaded during golem runs.
 #
 # This target is only used by Golem now.
 #
@@ -630,8 +628,7 @@
                        libm.bootstrap \
                        linker \
                        $(RELEASE_ART_APEX) \
-                       $(CONSCRYPT_APEX) \
-                       $(I18N_APEX)
+                       $(CONSCRYPT_APEX)
 	for f in $(PRIVATE_BIONIC_FILES); do \
 	  tf=$(TARGET_OUT)/$$f; \
 	  if [ -f $$tf ]; then cp -f $$tf $$(echo $$tf | sed 's,bootstrap/,,'); fi; \
@@ -663,11 +660,6 @@
 	  tf="$$conscrypt_apex_orig_dir/$$f"; \
 	  if [ -f $$tf ]; then cp -f $$tf $(TARGET_OUT)/$$f; fi; \
 	done; \
-	i18n_apex_orig_dir=$$apex_orig_dir/$(I18N_APEX); \
-	for f in $(PRIVATE_I18N_APEX_DEPENDENCY_LIBS); do \
-	  tf="$$i18n_apex_orig_dir/$$f"; \
-	  if [ -f $$tf ]; then cp -f $$tf $(TARGET_OUT)/$$f; fi; \
-	done; \
 
 ########################################################################
 # Phony target for only building what go/lem requires for pushing ART on /data.
diff --git a/build/Android.bp b/build/Android.bp
index 6ac0f5b..3bbeebd 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -251,7 +251,7 @@
 
 // A version of conscrypt only for enabling the "-hostdex" version to test ART on host.
 java_library {
-    // We need our own name to not clash with the conscrypt library.
+    // We need our own name to not class with the conscrypt library.
     name: "conscrypt-host",
     installable: true,
     hostdex: true,
@@ -268,23 +268,3 @@
         },
     },
 }
-
-// A version of core-icu4j only for enabling the "-hostdex" version to test ART on host.
-java_library {
-    // We need our own name to not clash with the core-icu4j library.
-    name: "core-icu4j-host",
-    installable: true,
-    hostdex: true,
-    static_libs: ["core-icu4j"],
-
-    // Tests and build files rely on this file to be installed as "core-icu4j-hostdex",
-    // therefore set a stem. Without it, the file would be installed as
-    // "core-icu4j-host-hostdex".
-    stem: "core-icu4j",
-    sdk_version: "core_platform",
-    target: {
-        hostdex: {
-            required: ["libicu_jni"],
-        },
-    },
-}
diff --git a/build/Android.common_path.mk b/build/Android.common_path.mk
index 03a136c..1d67037 100644
--- a/build/Android.common_path.mk
+++ b/build/Android.common_path.mk
@@ -74,7 +74,7 @@
 TARGET_CORE_IMG_LOCATION := $(ART_TARGET_TEST_OUT)/core.art
 
 # Modules to compile for core.art.
-CORE_IMG_JARS := core-oj core-libart okhttp bouncycastle apache-xml
+CORE_IMG_JARS := core-oj core-libart core-icu4j okhttp bouncycastle apache-xml
 HOST_CORE_IMG_JARS   := $(addsuffix -hostdex,$(CORE_IMG_JARS))
 TARGET_CORE_IMG_JARS := $(CORE_IMG_JARS)
 HOST_CORE_IMG_DEX_LOCATIONS   := $(foreach jar,$(HOST_CORE_IMG_JARS),  $(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar)
@@ -93,17 +93,14 @@
 HOST_BOOT_IMAGE_JARS += $(HOST_OUT)/apex/com.android.conscrypt/javalib/conscrypt.jar
 $(HOST_OUT)/apex/com.android.conscrypt/javalib/conscrypt.jar : $(HOST_OUT_JAVA_LIBRARIES)/conscrypt-hostdex.jar
 	$(copy-file-to-target)
-HOST_BOOT_IMAGE_JARS += $(HOST_OUT)/apex/com.android.i18n/javalib/core-icu4j.jar
-$(HOST_OUT)/apex/com.android.i18n/javalib/core-icu4j.jar : $(HOST_OUT_JAVA_LIBRARIES)/core-icu4j-hostdex.jar
-	$(copy-file-to-target)
 
 HOST_CORE_IMG_OUTS += $(HOST_BOOT_IMAGE_JARS) $(HOST_BOOT_IMAGE) $(2ND_HOST_BOOT_IMAGE)
 
-HOST_TEST_CORE_JARS   := $(addsuffix -hostdex,$(CORE_IMG_JARS) core-icu4j conscrypt)
+HOST_TEST_CORE_JARS   := $(addsuffix -hostdex,$(CORE_IMG_JARS) conscrypt)
 ART_HOST_DEX_DEPENDENCIES := $(foreach jar,$(HOST_TEST_CORE_JARS),$(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar)
-ART_TARGET_DEX_DEPENDENCIES := com.android.art.testing com.android.conscrypt com.android.i18n
+ART_TARGET_DEX_DEPENDENCIES := com.android.art.testing com.android.conscrypt
 
-ART_CORE_SHARED_LIBRARIES := libjavacore libopenjdk libopenjdkjvm libopenjdkjvmti
+ART_CORE_SHARED_LIBRARIES := libicu_jni libjavacore libopenjdk libopenjdkjvm libopenjdkjvmti
 ART_CORE_SHARED_DEBUG_LIBRARIES := libopenjdkd libopenjdkjvmd libopenjdkjvmtid
 ART_HOST_SHARED_LIBRARY_DEPENDENCIES := $(foreach lib,$(ART_CORE_SHARED_LIBRARIES), $(ART_HOST_OUT_SHARED_LIBRARIES)/$(lib)$(ART_HOST_SHLIB_EXTENSION))
 ART_HOST_SHARED_LIBRARY_DEBUG_DEPENDENCIES := $(foreach lib,$(ART_CORE_SHARED_DEBUG_LIBRARIES), $(ART_HOST_OUT_SHARED_LIBRARIES)/$(lib)$(ART_HOST_SHLIB_EXTENSION))
@@ -159,7 +156,5 @@
 
 # Conscrypt APEX
 CONSCRYPT_APEX := com.android.conscrypt
-# i18n APEX
-I18N_APEX := com.android.i18n
 
 endif # ART_ANDROID_COMMON_PATH_MK
diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk
index ab9d594..910d7f9 100644
--- a/build/Android.gtest.mk
+++ b/build/Android.gtest.mk
@@ -628,7 +628,7 @@
 ifeq ($(ART_BUILD_TARGET),true)
   $(foreach name,$(ART_TARGET_GTEST_NAMES), $(eval $(call add-art-gtest-dependencies,$(name),)))
   ART_TEST_TARGET_GTEST_DEPENDENCIES += \
-    libicu_jni.com.android.i18n \
+    libicu_jni.com.android.art.testing \
     libjavacore.com.android.art.testing \
     libopenjdkd.com.android.art.testing \
     com.android.art.testing \
diff --git a/build/apex/Android.bp b/build/apex/Android.bp
index a1112b7..706fa96 100644
--- a/build/apex/Android.bp
+++ b/build/apex/Android.bp
@@ -141,6 +141,7 @@
 libcore_java_libs = [
     "core-oj",
     "core-libart",
+    "core-icu4j",
     "okhttp",
     "bouncycastle",
     "apache-xml",
@@ -159,10 +160,14 @@
 // the ART APEX.
 libcore_native_shared_libs = [
     // External API (having APEX stubs).
+    "libandroidicu",
     "libandroidio",
     // TODO(b/124476339): Clean up the following libraries once "required"
     // dependencies work with APEX libraries.
     "libexpat",
+    "libicui18n",
+    "libicuuc",
+    "libicu_jni",
     "libjavacore",
     "libopenjdk",
 ]
@@ -170,6 +175,12 @@
     "libopenjdkd",
 ]
 
+libcore_native_device_only_shared_libs = [
+    // TODO(b/122876336): Remove libpac.so once it's migrated to Webview.
+    // libpac is used by frameworks, not by ART host.
+    "libpac",
+]
+
 // Temporary library includes for b/123591866 as all libraries are moved into the main art-apex.
 art_runtime_libraries_zipapex = [
     "libnativebridge",
@@ -197,6 +208,7 @@
     java_libs: libcore_java_libs,
     native_shared_libs: art_runtime_base_native_shared_libs +
         art_runtime_base_native_device_only_shared_libs +
+        libcore_native_device_only_shared_libs +
         libcore_native_shared_libs,
     multilib: {
         both: {
diff --git a/build/apex/art_apex_test.py b/build/apex/art_apex_test.py
index aa95eb7..6bccdf5 100755
--- a/build/apex/art_apex_test.py
+++ b/build/apex/art_apex_test.py
@@ -542,6 +542,7 @@
     # Check java libraries for Managed Core Library.
     self._checker.check_java_library('apache-xml')
     self._checker.check_java_library('bouncycastle')
+    self._checker.check_java_library('core-icu4j')
     self._checker.check_java_library('core-libart')
     self._checker.check_java_library('core-oj')
     self._checker.check_java_library('okhttp')
@@ -585,6 +586,7 @@
     self._checker.check_dexpreopt('boot')
     self._checker.check_dexpreopt('boot-apache-xml')
     self._checker.check_dexpreopt('boot-bouncycastle')
+    self._checker.check_dexpreopt('boot-core-icu4j')
     self._checker.check_dexpreopt('boot-core-libart')
     self._checker.check_dexpreopt('boot-okhttp')
     if isEnvTrue('EMMA_INSTRUMENT_FRAMEWORK'):
@@ -613,11 +615,16 @@
     self._checker.check_native_library('libperfetto_hprof')
 
     # Check exported native libraries for Managed Core Library.
+    self._checker.check_native_library('libandroidicu')
     self._checker.check_native_library('libandroidio')
 
     # Check internal native library dependencies.
     self._checker.check_native_library('libcrypto')
     self._checker.check_native_library('libexpat')
+    self._checker.check_native_library('libicui18n')
+    self._checker.check_native_library('libicuuc')
+    self._checker.check_native_library('libicu_jni')
+    self._checker.check_native_library('libpac')
     self._checker.check_native_library('libz')
 
     # TODO(b/139046641): Fix proper 2nd arch checks. For now, just ignore these
@@ -646,6 +653,9 @@
 
     # Check internal libraries for Managed Core Library.
     self._checker.check_native_library('libexpat-host')
+    self._checker.check_native_library('libicui18n-host')
+    self._checker.check_native_library('libicuuc-host')
+    self._checker.check_native_library('libicu_jni')
     self._checker.check_native_library('libz-host')
 
 
diff --git a/build/apex/manifest-art.json b/build/apex/manifest-art.json
index dc4e48a..b1d4e99 100644
--- a/build/apex/manifest-art.json
+++ b/build/apex/manifest-art.json
@@ -1,11 +1,11 @@
 {
   "name": "com.android.art",
   "version": 1,
-  "requireNativeLibs": [
-    "libandroidicu.so",
-    "libicuuc.so",
+  "provideNativeLibs": [
     "libicui18n.so",
-    "libicu_jni.so",
+    "libicuuc.so"
+  ],
+  "requireNativeLibs": [
     "libneuralnetworks.so"
   ]
 }
diff --git a/dex2oat/dex2oat_image_test.cc b/dex2oat/dex2oat_image_test.cc
index 71e9b1b..d01b64f 100644
--- a/dex2oat/dex2oat_image_test.cc
+++ b/dex2oat/dex2oat_image_test.cc
@@ -184,11 +184,13 @@
   }
   // Compile only a subset of the libcore dex files to make this test shorter.
   std::vector<std::string> libcore_dex_files = GetLibCoreDexFileNames();
-  // The primary image must contain at least core-oj and core-libart to initialize the runtime.
+  // The primary image must contain at least core-oj and core-libart to initialize the runtime
+  // and we also need the core-icu4j if we want to compile these with full profile.
   ASSERT_NE(std::string::npos, libcore_dex_files[0].find("core-oj"));
   ASSERT_NE(std::string::npos, libcore_dex_files[1].find("core-libart"));
+  ASSERT_NE(std::string::npos, libcore_dex_files[2].find("core-icu4j"));
   ArrayRef<const std::string> dex_files =
-      ArrayRef<const std::string>(libcore_dex_files).SubArray(/*pos=*/ 0u, /*length=*/ 2u);
+      ArrayRef<const std::string>(libcore_dex_files).SubArray(/*pos=*/ 0u, /*length=*/ 3u);
 
   ImageSizes base_sizes = CompileImageAndGetSizes(dex_files, {});
   ImageSizes everything_sizes;
@@ -272,17 +274,19 @@
 
   ArrayRef<const std::string> full_bcp(libcore_dex_files);
   size_t total_dex_files = full_bcp.size();
-  ASSERT_GE(total_dex_files, 4u);  // 2 for "head", 1 for "tail", at least one for "mid", see below.
+  ASSERT_GE(total_dex_files, 5u);  // 3 for "head", 1 for "tail", at least one for "mid", see below.
 
-  // The primary image must contain at least core-oj and core-libart to initialize the runtime.
+  // The primary image must contain at least core-oj and core-libart to initialize the runtime
+  // and we also need the core-icu4j if we want to compile these with full profile.
   ASSERT_NE(std::string::npos, full_bcp[0].find("core-oj"));
   ASSERT_NE(std::string::npos, full_bcp[1].find("core-libart"));
-  ArrayRef<const std::string> head_dex_files = full_bcp.SubArray(/*pos=*/ 0u, /*length=*/ 2u);
+  ASSERT_NE(std::string::npos, full_bcp[2].find("core-icu4j"));
+  ArrayRef<const std::string> head_dex_files = full_bcp.SubArray(/*pos=*/ 0u, /*length=*/ 3u);
   // Middle part is everything else except for conscrypt.
   ASSERT_NE(std::string::npos, full_bcp[full_bcp.size() - 1u].find("conscrypt"));
   ArrayRef<const std::string> mid_bcp =
       full_bcp.SubArray(/*pos=*/ 0u, /*length=*/ total_dex_files - 1u);
-  ArrayRef<const std::string> mid_dex_files = mid_bcp.SubArray(/*pos=*/ 2u);
+  ArrayRef<const std::string> mid_dex_files = mid_bcp.SubArray(/*pos=*/ 3u);
   // Tail is just the conscrypt.
   ArrayRef<const std::string> tail_dex_files =
       full_bcp.SubArray(/*pos=*/ total_dex_files - 1u, /*length=*/ 1u);
diff --git a/libartbase/base/common_art_test.cc b/libartbase/base/common_art_test.cc
index 46ac227..62535a4 100644
--- a/libartbase/base/common_art_test.cc
+++ b/libartbase/base/common_art_test.cc
@@ -400,9 +400,9 @@
 
 static std::string GetDexFileName(const std::string& jar_prefix, bool host) {
   std::string prefix(host ? GetAndroidRoot() : "");
-  const char* apexPath = (jar_prefix == "conscrypt") ? kAndroidConscryptApexDefaultPath
-    : (jar_prefix == "core-icu4j" ? kAndroidI18nApexDefaultPath
-    : kAndroidArtApexDefaultPath);
+  const char* apexPath = (jar_prefix == "conscrypt")
+    ? kAndroidConscryptApexDefaultPath
+    : kAndroidArtApexDefaultPath;
   return StringPrintf("%s%s/javalib/%s.jar", prefix.c_str(), apexPath, jar_prefix.c_str());
 }
 
@@ -414,11 +414,11 @@
       // CORE_IMG_JARS modules.
       "core-oj",
       "core-libart",
+      "core-icu4j",
       "okhttp",
       "bouncycastle",
       "apache-xml",
       // Additional modules.
-      "core-icu4j",
       "conscrypt",
   };
 }
diff --git a/libartbase/base/file_utils.h b/libartbase/base/file_utils.h
index a521c97..b1d044a 100644
--- a/libartbase/base/file_utils.h
+++ b/libartbase/base/file_utils.h
@@ -29,7 +29,6 @@
 
 static constexpr const char* kAndroidArtApexDefaultPath = "/apex/com.android.art";
 static constexpr const char* kAndroidConscryptApexDefaultPath = "/apex/com.android.conscrypt";
-static constexpr const char* kAndroidI18nApexDefaultPath = "/apex/com.android.i18n";
 
 // These methods return the Android Root, which is the historical location of
 // the Android "system" directory, containing the built Android artifacts. On
diff --git a/libnativeloader/README.md b/libnativeloader/README.md
index c5ace61..57b9001 100644
--- a/libnativeloader/README.md
+++ b/libnativeloader/README.md
@@ -34,7 +34,7 @@
 [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 14ba721..d42a4b5 100644
--- a/libnativeloader/library_namespaces.cpp
+++ b/libnativeloader/library_namespaces.cpp
@@ -51,7 +51,6 @@
 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 @@
     }
   }
 
-  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 e64e1a5..66d7531 100644
--- a/libnativeloader/native_loader_test.cpp
+++ b/libnativeloader/native_loader_test.cpp
@@ -97,7 +97,7 @@
 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 @@
   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 @@
   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 @@
                                               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 575ce2d..7bb5a1f 100644
--- a/libnativeloader/public_libraries.cpp
+++ b/libnativeloader/public_libraries.cpp
@@ -57,15 +57,12 @@
 constexpr const char* kVndkLibrariesFile = "/apex/com.android.vndk.v{}/etc/vndksp.libraries.{}.txt";
 
 const std::vector<const std::string> kArtApexPublicLibraries = {
+    "libicuuc.so",
+    "libicui18n.so",
     "libnativehelper.so",
 };
 
-const std::vector<const std::string> ki18nApexPublicLibraries = {
-    "libicuuc.so",
-    "libicui18n.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 @@
     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 @@
   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 @@
   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 b60a2ef..9b8b2a4 100644
--- a/libnativeloader/public_libraries.h
+++ b/libnativeloader/public_libraries.h
@@ -36,7 +36,6 @@
 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();
diff --git a/runtime/gc/space/image_space_test.cc b/runtime/gc/space/image_space_test.cc
index efd82d9..b08c680 100644
--- a/runtime/gc/space/image_space_test.cc
+++ b/runtime/gc/space/image_space_test.cc
@@ -60,17 +60,13 @@
   int mkdir_result = mkdir(image_dir.c_str(), 0700);
   ASSERT_EQ(0, mkdir_result);
 
-  // Prepare boot class path variables, exclude core-icu4j and conscrypt
-  // which are not in the primary boot image.
+  // Prepare boot class path variables, exclude conscrypt which is not in the primary boot image.
   std::vector<std::string> bcp = GetLibCoreDexFileNames();
   std::vector<std::string> bcp_locations = GetLibCoreDexLocations();
   CHECK_EQ(bcp.size(), bcp_locations.size());
   ASSERT_NE(std::string::npos, bcp.back().find("conscrypt"));
   bcp.pop_back();
   bcp_locations.pop_back();
-  ASSERT_NE(std::string::npos, bcp.back().find("core-icu4j"));
-  bcp.pop_back();
-  bcp_locations.pop_back();
   std::string base_bcp_string = android::base::Join(bcp, ':');
   std::string base_bcp_locations_string = android::base::Join(bcp_locations, ':');
   std::string base_image_location = GetImageLocation();
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index 141aab7..97bb396 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -711,7 +711,7 @@
 # Note: This must start with the CORE_IMG_JARS in Android.common_path.mk
 # because that's what we use for compiling the core.art image.
 # It may contain additional modules from TEST_CORE_JARS.
-bpath_modules="core-oj core-libart okhttp bouncycastle apache-xml core-icu4j conscrypt"
+bpath_modules="core-oj core-libart core-icu4j okhttp bouncycastle apache-xml conscrypt"
 bpath=""
 bpath_locations=""
 bpath_separator=""
@@ -736,8 +736,6 @@
       apex_module="com.android.art"
       if [ "${bpath_module}" = "conscrypt" ]; then
         apex_module="com.android.conscrypt"
-      elif [ "${bpath_module}" = "core-icu4j" ]; then
-        apex_module="com.android.i18n"
       fi
       bpath+="${bpath_separator}/apex/${apex_module}/javalib/${bpath_module}.jar"
       bpath_locations+="${bpath_separator}/apex/${apex_module}/javalib/${bpath_module}.jar"
diff --git a/tools/bootjars.sh b/tools/bootjars.sh
index d6882a5..bb840b0 100755
--- a/tools/bootjars.sh
+++ b/tools/bootjars.sh
@@ -75,19 +75,15 @@
   # Note: This must start with the CORE_IMG_JARS in Android.common_path.mk
   # because that's what we use for compiling the core.art image.
   # It may contain additional modules from TEST_CORE_JARS.
-  core_jars_list="core-oj core-libart okhttp bouncycastle apache-xml core-icu4j"
+  core_jars_list="core-oj core-libart core-icu4j okhttp bouncycastle apache-xml"
+  core_jars_suffix=
+  if [[ $mode == host ]]; then
+    core_jars_suffix=-hostdex
+  fi
   boot_jars_list=""
   boot_separator=""
   for boot_module in ${core_jars_list}; do
-    jar_suffix=
-    if [[ $mode == host ]]; then
-      if [[ $boot_module == core-icu4j ]]; then
-        jar_suffix="-host-hostdex"
-      else
-        jar_suffix="-hostdex"
-      fi
-    fi
-    boot_jars_list+="${boot_separator}${boot_module}${jar_suffix}"
+    boot_jars_list+="${boot_separator}${boot_module}${core_jars_suffix}"
     boot_separator=" "
   done
 else
@@ -112,8 +108,6 @@
   for jar in $boot_jars_list; do
     if [[ $jar == "conscrypt" ]]; then
       echo "$intermediates_dir/JAVA_LIBRARIES/${jar}.com.android.conscrypt_intermediates/classes.jar"
-    elif [[ $jar == "core-icu4j" ]]; then
-      echo "$intermediates_dir/JAVA_LIBRARIES/${jar}.com.android.i18n_intermediates/classes.jar"
     else
       echo "$intermediates_dir/JAVA_LIBRARIES/${jar}.com.android.art.testing_intermediates/classes.jar"
     fi
diff --git a/tools/run-jdwp-tests.sh b/tools/run-jdwp-tests.sh
index 062db09..f67e46d 100755
--- a/tools/run-jdwp-tests.sh
+++ b/tools/run-jdwp-tests.sh
@@ -42,8 +42,6 @@
   do
     if [ "$var" = "conscrypt" ] && [ "$mode" = "target" ]; then
       printf -- "${separator}/apex/com.android.conscrypt/javalib/conscrypt.jar";
-    elif [ "$var" = "core-icu4j" ] && [ "$mode" = "target" ]; then
-      printf -- "${separator}/apex/com.android.i18n/javalib/core-icu4j.jar";
     else
       printf -- "${separator}${dir}/${var}${suffix}.jar";
     fi
@@ -54,7 +52,7 @@
 # Note: This must start with the CORE_IMG_JARS in Android.common_path.mk
 # because that's what we use for compiling the core.art image.
 # It may contain additional modules from TEST_CORE_JARS.
-BOOT_CLASSPATH_JARS="core-oj core-libart okhttp bouncycastle apache-xml core-icu4j conscrypt"
+BOOT_CLASSPATH_JARS="core-oj core-libart core-icu4j okhttp bouncycastle apache-xml conscrypt"
 
 vm_args=""
 art="$android_root/bin/art"
diff --git a/tools/run-libcore-tests.sh b/tools/run-libcore-tests.sh
index ff3c433..7140b13 100755
--- a/tools/run-libcore-tests.sh
+++ b/tools/run-libcore-tests.sh
@@ -52,7 +52,7 @@
   do
     printf -- ":${dir}/${var}.jar";
   done
-  printf -- ":/apex/com.android.i18n/javalib/core-icu4j.jar:/apex/com.android.conscrypt/javalib/conscrypt.jar";
+  printf -- ":/apex/com.android.conscrypt/javalib/conscrypt.jar";
 }
 
 function usage {
@@ -147,7 +147,7 @@
 # Note: This must start with the CORE_IMG_JARS in Android.common_path.mk
 # because that's what we use for compiling the core.art image.
 # It may contain additional modules from TEST_CORE_JARS.
-BOOT_CLASSPATH_JARS="core-oj core-libart okhttp bouncycastle apache-xml"
+BOOT_CLASSPATH_JARS="core-oj core-libart core-icu4j okhttp bouncycastle apache-xml"
 
 DEPS="core-tests jsr166-tests mockito-target"