composd: prepare staging directory w/ libartpalette-system
Output files are staged until they are fully generated, then move to the
final location. The staging directory has a different SELinux context to
prevent misuse, and should change when it's moved to the final
directory.
This change makes composd to follow the same setup, using libartpalette.
As a result, the output are no longer stored in CompOS's own apexdata
(which was not intentional).
This change does not use bindgen, which seems have some difficulty to
bridge `const char**` correctly. Neither cxx, since it doesn't seem to
simplify the (already simple) call.
Bug: 205750213
Test: See odrefresh produces output in the staging directory
Change-Id: Ifc97b31a98052a31209556449d1642089a8c0e2e
diff --git a/compos/composd/native/Android.bp b/compos/composd/native/Android.bp
index ad0afd9..135f4d4 100644
--- a/compos/composd/native/Android.bp
+++ b/compos/composd/native/Android.bp
@@ -7,12 +7,17 @@
crate_name: "composd_native",
srcs: ["lib.rs"],
rustlibs: [
+ "libanyhow",
"libcxx",
+ "liblibc",
],
static_libs: [
"libcomposd_native_cpp",
],
- shared_libs: ["libcrypto"],
+ shared_libs: [
+ "libartpalette-system",
+ "libcrypto",
+ ],
apex_available: ["com.android.compos"],
}