package {
    default_team: "trendy_team_fwk_uwb",
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "hardware_interfaces_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["hardware_interfaces_license"],
}

rust_binary {
    name: "android.hardware.uwb-service",
    crate_name: "uwb_default_hal",
    relative_install_path: "hw",
    vendor: true,
    prefer_rlib: true,
    rustlibs: [
        "android.hardware.uwb-V1-rust",
        "liblibc",
        "liblogger",
        "liblog_rust",
        "libbinder_rs",
        "libbinder_tokio_rs",
        "libtokio",
        "libtokio_util",
        "libnix",
        "libanyhow",
        "libpdl_runtime",
        "libuwb_uci_packets",
    ],
    proc_macros: [
        "libasync_trait",
    ],
    srcs: [
        "src/service.rs",
    ],
}

prebuilt_etc {
    name: "uwb-service.rc",
    src: "uwb-service.rc",
    vendor: true,
    installable: false,
}

prebuilt_etc {
    name: "uwb-service.xml",
    src: "uwb-service.xml",
    sub_dir: "vintf",
    vendor: true,
    installable: false,
}

apex {
    name: "com.android.hardware.uwb",
    manifest: "manifest.json",
    file_contexts: "file_contexts",
    key: "com.android.hardware.key",
    certificate: ":com.android.hardware.certificate",
    updatable: false,
    vendor: true,

    binaries: [
        "android.hardware.uwb-service",
    ],
    prebuilts: [
        "uwb-service.rc", // init_rc
        "uwb-service.xml", // vintf_fragments
    ],
}
