Cuttlefish sensors apex uses aidl implementation

Bug: 210883464
Test: atest hal_implementation VtsAidlHalSensorsTargetTest
Tests run on abtd:
https://android-build.googleplex.com/builds/abtd/run/L63300000953949688
https://android-build.googleplex.com/builds/abtd/run/L18600000953935211
One test is failing on tip of tree
Change-Id: Iec27e916c94e5a327fc6c4d87451e055b14d9660
This commit is contained in:
deyaoren@google.com 2022-04-05 22:16:49 +00:00 committed by Deyao Ren
parent 5fbc4b3012
commit bde01c60fa
10 changed files with 26 additions and 9 deletions

View file

@ -1,4 +0,0 @@
{
"name": "com.android.hardware.sensors",
"version": 1
}

View file

@ -23,6 +23,16 @@ package {
default_applicable_licenses: ["hardware_interfaces_license"],
}
filegroup {
name: "sensors-default.rc",
srcs: ["sensors-default.rc"],
}
filegroup {
name: "sensors-default.xml",
srcs: ["sensors-default.xml"],
}
cc_library_static {
name: "libsensorsexampleimpl",
vendor: true,
@ -47,8 +57,8 @@ cc_library_static {
cc_binary {
name: "android.hardware.sensors-service.example",
relative_install_path: "hw",
init_rc: ["sensors-default.rc"],
vintf_fragments: ["sensors-default.xml"],
init_rc: [":sensors-default.rc"],
vintf_fragments: [":sensors-default.xml"],
vendor: true,
shared_libs: [
"libbase",

View file

@ -13,9 +13,16 @@ android_app_certificate {
certificate: "com.android.hardware.sensors",
}
genrule {
name: "com.android.hardware.sensors.rc-gen",
srcs: [":sensors-default.rc"],
out: ["com.android.hardware.sensors.rc"],
cmd: "sed -E 's/\\/vendor/\\/apex\\/com.android.hardware.sensors/' $(in) > $(out)",
}
prebuilt_etc {
name: "com.android.hardware.sensors.rc",
src: "com.android.hardware.sensors.rc",
src: ":com.android.hardware.sensors.rc-gen",
installable: false,
}
@ -31,7 +38,7 @@ apex {
updatable: false,
// Install the apex in /vendor/apex
soc_specific: true,
binaries: ["android.hardware.sensors@2.1-service.mock"],
binaries: ["android.hardware.sensors-service.example"],
prebuilts: [
"com.android.hardware.sensors.rc",
"android.hardware.sensor.ambient_temperature.prebuilt.xml",
@ -42,5 +49,5 @@ apex {
"android.hardware.sensor.proximity.prebuilt.xml",
"android.hardware.sensor.relative_humidity.prebuilt.xml",
],
vintf_fragments: [":android.hardware.sensors@2.1.xml"],
vintf_fragments: [":sensors-default.xml"],
}

View file

@ -0,0 +1,4 @@
{
"name": "com.android.hardware.sensors",
"version": 1
}