diff --git a/sensors/2.1/default/apex/apex_manifest.json b/sensors/2.1/default/apex/apex_manifest.json deleted file mode 100644 index 47e45ee63e..0000000000 --- a/sensors/2.1/default/apex/apex_manifest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "com.android.hardware.sensors", - "version": 1 -} diff --git a/sensors/aidl/default/Android.bp b/sensors/aidl/default/Android.bp index 49841a456b..3c66744324 100644 --- a/sensors/aidl/default/Android.bp +++ b/sensors/aidl/default/Android.bp @@ -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", diff --git a/sensors/2.1/default/apex/Android.bp b/sensors/aidl/default/apex/Android.bp similarity index 78% rename from sensors/2.1/default/apex/Android.bp rename to sensors/aidl/default/apex/Android.bp index 3345b92b90..ceb428b5da 100644 --- a/sensors/2.1/default/apex/Android.bp +++ b/sensors/aidl/default/apex/Android.bp @@ -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"], } diff --git a/sensors/aidl/default/apex/apex_manifest.json b/sensors/aidl/default/apex/apex_manifest.json new file mode 100644 index 0000000000..659e739c66 --- /dev/null +++ b/sensors/aidl/default/apex/apex_manifest.json @@ -0,0 +1,4 @@ +{ + "name": "com.android.hardware.sensors", + "version": 1 +} diff --git a/sensors/2.1/default/apex/com.android.hardware.sensors.avbpubkey b/sensors/aidl/default/apex/com.android.hardware.sensors.avbpubkey similarity index 100% rename from sensors/2.1/default/apex/com.android.hardware.sensors.avbpubkey rename to sensors/aidl/default/apex/com.android.hardware.sensors.avbpubkey diff --git a/sensors/2.1/default/apex/com.android.hardware.sensors.pem b/sensors/aidl/default/apex/com.android.hardware.sensors.pem similarity index 100% rename from sensors/2.1/default/apex/com.android.hardware.sensors.pem rename to sensors/aidl/default/apex/com.android.hardware.sensors.pem diff --git a/sensors/2.1/default/apex/com.android.hardware.sensors.pk8 b/sensors/aidl/default/apex/com.android.hardware.sensors.pk8 similarity index 100% rename from sensors/2.1/default/apex/com.android.hardware.sensors.pk8 rename to sensors/aidl/default/apex/com.android.hardware.sensors.pk8 diff --git a/sensors/2.1/default/apex/com.android.hardware.sensors.rc b/sensors/aidl/default/apex/com.android.hardware.sensors.rc similarity index 100% rename from sensors/2.1/default/apex/com.android.hardware.sensors.rc rename to sensors/aidl/default/apex/com.android.hardware.sensors.rc diff --git a/sensors/2.1/default/apex/com.android.hardware.sensors.x509.pem b/sensors/aidl/default/apex/com.android.hardware.sensors.x509.pem similarity index 100% rename from sensors/2.1/default/apex/com.android.hardware.sensors.x509.pem rename to sensors/aidl/default/apex/com.android.hardware.sensors.x509.pem diff --git a/sensors/2.1/default/apex/file_contexts b/sensors/aidl/default/apex/file_contexts similarity index 100% rename from sensors/2.1/default/apex/file_contexts rename to sensors/aidl/default/apex/file_contexts