Add module `libopenjdk` to the Android Runtime APEX module.

This is so that we can remove it from `PRODUCT_PACKAGES`, i.e. no
longer install it on /system, as module `libopenjdk` depends on module
`libart`; the installation of the former would trigger the
installation of the latter, which we are trying to stop (see companion
change in project platform/build).

Also label `libopenjdkd` as a Libcore library in the Runtime APEX
definition.

Test: art/build/apex/runtests.sh
Test: Device boot test with Android Runtime APEX.
Bug: 113373927
Change-Id: I17a6dec4b7b4e813a6d55c4aafbad2e793bfd69d
diff --git a/build/apex/Android.bp b/build/apex/Android.bp
index 47729c1..aa199d3 100644
--- a/build/apex/Android.bp
+++ b/build/apex/Android.bp
@@ -34,14 +34,17 @@
     "dexoptanalyzerd",
     "profmand",
 ]
+// - Debug variants (libraries).
 art_runtime_debug_native_shared_libs = [
     "libartd",
     "libartd-compiler",
-    "libopenjdkd",
     "libopenjdkjvmd",
     "libopenjdkjvmtid",
     "libadbconnectiond",
 ]
+libcore_debug_native_shared_libs = [
+    "libopenjdkd",
+]
 
 // Data files associated with bionic / managed core library APIs.
 art_runtime_data_file_prebuilts = [
@@ -77,6 +80,11 @@
 art_tools_device_binaries = art_tools_common_binaries + art_tools_device_only_binaries
 art_tools_host_binaries = art_tools_common_binaries + art_tools_host_only_binaries
 
+// (Some) Libcore native libraries.
+libcore_native_shared_libs = [
+    "libopenjdk",
+]
+
 apex_key {
     name: "com.android.runtime.key",
     public_key: "com.android.runtime.avbpubkey",
@@ -101,7 +109,8 @@
     compile_multilib: "both",
     manifest: "manifest.json",
     native_shared_libs: art_runtime_base_native_shared_libs
-        + bionic_native_shared_libs,
+        + bionic_native_shared_libs
+        + libcore_native_shared_libs,
     multilib: {
         both: {
             // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
@@ -130,7 +139,9 @@
     manifest: "manifest.json",
     native_shared_libs: art_runtime_base_native_shared_libs
         + art_runtime_debug_native_shared_libs
-        + bionic_native_shared_libs,
+        + bionic_native_shared_libs
+        + libcore_native_shared_libs
+        + libcore_debug_native_shared_libs,
     multilib: {
         both: {
             // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
@@ -164,7 +175,9 @@
     device_supported: false,
     manifest: "manifest.json",
     native_shared_libs: art_runtime_base_native_shared_libs
-        + art_runtime_debug_native_shared_libs,
+        + art_runtime_debug_native_shared_libs
+        + libcore_native_shared_libs
+        + libcore_debug_native_shared_libs,
     multilib: {
         both: {
             // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`