Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c9f493b authored by Emilian Peev's avatar Emilian Peev
Browse files

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
parent 2692358b
Loading
Loading
Loading
Loading
+31 −8
Original line number Diff line number Diff line
@@ -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: {
        without_hal: {
            vibrator: {
                vintf_fragment_modules: [
                    "manifest_services_android.frameworks.location.xml",
                    "manifest_services_android.frameworks.devicestate.xml",
                ],
            },
            devicestate: {
                vintf_fragment_modules: [
                "manifest_services.xml",
                    "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",
                ],
            },
        },
+7 −0
Original line number Diff line number Diff line
<manifest version="1.0" type="framework">
    <hal format="aidl">
        <name>android.frameworks.devicestate</name>
        <version>1</version>
        <fqname>IDeviceStateService/default</fqname>
    </hal>
</manifest>
+0 −5
Original line number Diff line number Diff line
@@ -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>