Add `libartserviced`.
Bug: 177273468
Test: -
1. Execute the following code on ART Services startup.
if (VMRuntime.getRuntime().vmLibrary().equals("libartd.so")) {
System.loadLibrary("artserviced");
} else {
System.loadLibrary("artservice");
}
2. Build `com.android.art.debug` and adb install it.
3. adb shell stop && adb shell setprop dalvik.vm.extra-opts '-verbose:jni' && adb shell start
4. See the following log.
[Call to dlopen("libartserviced.so", RTLD_NOW) returned 0x99b62074fe04a493]
Change-Id: Iad9ad6427f9f96b5867fcdf2fd9402e60040ac07
diff --git a/build/apex/Android.bp b/build/apex/Android.bp
index 6b9e684..3c305b8 100644
--- a/build/apex/Android.bp
+++ b/build/apex/Android.bp
@@ -323,6 +323,9 @@
art_runtime_run_test_libs +
art_runtime_debug_native_shared_libs +
libcore_debug_native_shared_libs,
+ jni_libs: [
+ "libartserviced",
+ ],
multilib: {
both: {
binaries: art_tools_debug_binaries_both +
diff --git a/libartservice/service/Android.bp b/libartservice/service/Android.bp
index 55b63b3..b946440 100644
--- a/libartservice/service/Android.bp
+++ b/libartservice/service/Android.bp
@@ -46,6 +46,20 @@
],
}
+cc_library {
+ name: "libartserviced",
+ defaults: [
+ "libartservice_defaults",
+ "art_debug_defaults",
+ ],
+ apex_available: [
+ "com.android.art",
+ "com.android.art.debug",
+ ],
+ shared_libs: [
+ ],
+}
+
// Provides the API and implementation of the ART Service class that will be
// loaded by the System Server.
java_sdk_library {