diff options
author | 2024-12-09 22:08:24 +0000 | |
---|---|---|
committer | 2024-12-12 11:01:05 -0800 | |
commit | 8c9f493b669c315ed2d2fee801ebd6343a4344ba (patch) | |
tree | 330a45867db4e0dafabc14fbe27d7dc488e4ee94 | |
parent | 2692358b4f619cf429abe56aac50490f932ab133 (diff) |
Add soong config to include different Hal services
Update the current "without_vibrator" condition variable
to allow including or removing further Hals such as
device state.
Flag: EXEMPT bugfix
Bug: 382468567
Test: atest vts_treble_vintf_framework_test
Test: Manual using adb shell dumpsys -l | grep devicestate
Test: Manual using adb shell dumpsys -l | grep Vibrator
Change-Id: I1c805f90c490ca9976616364fecb51ae045a9f5c
-rw-r--r-- | services/Android.bp | 39 | ||||
-rw-r--r-- | services/manifest_services_android.frameworks.devicestate.xml | 7 | ||||
-rw-r--r-- | services/manifest_services_android.frameworks.location.xml (renamed from services/manifest_services.xml) | 5 |
3 files changed, 38 insertions, 13 deletions
diff --git a/services/Android.bp b/services/Android.bp index fc0bb33e6e4e..6e35c67485dc 100644 --- a/services/Android.bp +++ b/services/Android.bp @@ -216,13 +216,21 @@ soong_config_module_type { name: "system_java_library", module_type: "java_library", config_namespace: "system_services", - bool_variables: ["without_vibrator"], + variables: ["without_hal"], properties: ["vintf_fragment_modules"], } +soong_config_string_variable { + name: "without_hal", + values: [ + "vibrator", + "devicestate", + ], +} + vintf_fragment { - name: "manifest_services.xml", - src: "manifest_services.xml", + name: "manifest_services_android.frameworks.location.xml", + src: "manifest_services_android.frameworks.location.xml", } vintf_fragment { @@ -230,6 +238,11 @@ vintf_fragment { src: "manifest_services_android.frameworks.vibrator.xml", } +vintf_fragment { + name: "manifest_services_android.frameworks.devicestate.xml", + src: "manifest_services_android.frameworks.devicestate.xml", +} + system_java_library { name: "services", defaults: [ @@ -297,14 +310,24 @@ system_java_library { ], soong_config_variables: { - without_vibrator: { - vintf_fragment_modules: [ - "manifest_services.xml", - ], + without_hal: { + vibrator: { + vintf_fragment_modules: [ + "manifest_services_android.frameworks.location.xml", + "manifest_services_android.frameworks.devicestate.xml", + ], + }, + devicestate: { + vintf_fragment_modules: [ + "manifest_services_android.frameworks.location.xml", + "manifest_services_android.frameworks.vibrator.xml", + ], + }, conditions_default: { vintf_fragment_modules: [ - "manifest_services.xml", + "manifest_services_android.frameworks.location.xml", "manifest_services_android.frameworks.vibrator.xml", + "manifest_services_android.frameworks.devicestate.xml", ], }, }, diff --git a/services/manifest_services_android.frameworks.devicestate.xml b/services/manifest_services_android.frameworks.devicestate.xml new file mode 100644 index 000000000000..dc189ec0b40a --- /dev/null +++ b/services/manifest_services_android.frameworks.devicestate.xml @@ -0,0 +1,7 @@ +<manifest version="1.0" type="framework"> + <hal format="aidl"> + <name>android.frameworks.devicestate</name> + <version>1</version> + <fqname>IDeviceStateService/default</fqname> + </hal> +</manifest> diff --git a/services/manifest_services.xml b/services/manifest_services_android.frameworks.location.xml index 945720544991..114fe324f016 100644 --- a/services/manifest_services.xml +++ b/services/manifest_services_android.frameworks.location.xml @@ -4,9 +4,4 @@ <version>2</version> <fqname>IAltitudeService/default</fqname> </hal> - <hal format="aidl"> - <name>android.frameworks.devicestate</name> - <version>1</version> - <fqname>IDeviceStateService/default</fqname> - </hal> </manifest> |