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

Commit a2ff65bf authored by Harshit Mahajan's avatar Harshit Mahajan
Browse files

Add CrashRecovery stubs to core services

We would need to add CrashRecovery stubs to be present at build time for
"services" and "services.core.unboosted".
Adding this conditionally behind build flag.

Bug: 289203818
Test: builds successfully with flag enabled
Flag: build.release_crashrecovery_module
Change-Id: I983d5340a4a1d7097fa97f5230152dc83a42babb
parent 7f408e78
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -188,6 +188,28 @@ art_profile_java_defaults {
    },
}

// Conditionally add crashrecovery stubs library
soong_config_module_type {
    name: "crashrecovery_java_defaults",
    module_type: "java_defaults",
    config_namespace: "ANDROID",
    bool_variables: [
        "release_crashrecovery_module",
    ],
    properties: [
        "libs",
    ],
}

crashrecovery_java_defaults {
    name: "services_crashrecovery_stubs_conditionally",
    soong_config_variables: {
        release_crashrecovery_module: {
            libs: ["service-crashrecovery.stubs.system_server"],
        },
    },
}

// merge all required services into one jar
// ============================================================
soong_config_module_type {
@@ -213,6 +235,7 @@ system_java_library {
    defaults: [
        "services_java_defaults",
        "art_profile_java_defaults",
        "services_crashrecovery_stubs_conditionally",
    ],
    installable: true,

+1 −0
Original line number Diff line number Diff line
@@ -126,6 +126,7 @@ java_library_static {
        "platform_service_defaults",
        "android.hardware.power-java_shared",
        "latest_android_hardware_broadcastradio_java_static",
        "services_crashrecovery_stubs_conditionally",
    ],
    srcs: [
        ":android.hardware.tv.hdmi.connection-V1-java-source",