Bootstrap IInputFlingerRust - the Rust component of inputflinger
When inputflinger boots, we create the Rust component of inputflinger,
which we interact with from C++ through the local AIDL interface
IInputFlingerRust.
After we have access to the IInputFlingerRust binder object in C++, all
communication between C++ and Rust can take place purely through AIDL
interfaces.
To initialize the interface, we must first pass a raw pointer to an AIDL
implementation across the language barrier through some other means. In
this CL, we use cxxbridge to bootstrap the local AIDL interface for
IInputFlingerRust.
Bug: 278783893
Test: manual, boot
Change-Id: Ifbd0168ae4fadaa5b357f6064113f1691e6cf5a7
diff --git a/services/inputflinger/Android.bp b/services/inputflinger/Android.bp
index 18f6dbc..d551213 100644
--- a/services/inputflinger/Android.bp
+++ b/services/inputflinger/Android.bp
@@ -87,6 +87,7 @@
srcs: [":libinputflinger_sources"],
shared_libs: [
"android.hardware.input.processor-V1-ndk",
+ "com.android.server.inputflinger-ndk",
"libbase",
"libbinder",
"libbinder_ndk",
@@ -107,6 +108,14 @@
"libpalmrejection",
"libui-types",
],
+ generated_headers: [
+ "cxx-bridge-header",
+ "inputflinger_rs_bootstrap_bridge_header",
+ ],
+ header_libs: ["inputflinger_rs_bootstrap_cxx_headers"],
+ generated_sources: ["inputflinger_rs_bootstrap_bridge_code"],
+ whole_static_libs: ["libinputflinger_rs"],
+ export_shared_lib_headers: ["com.android.server.inputflinger-ndk"],
target: {
android: {
shared_libs: [