/*
 * Copyright (C) 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package {
    // 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"],
}

cc_library_static {
    name: "libcontexthubexampleimpl",
    vendor: true,
    shared_libs: [
        "libbase",
        "libbinder_ndk",
        "android.hardware.contexthub-V3-ndk",
    ],
    export_include_dirs: ["include"],
    srcs: [
        "ContextHub.cpp",
    ],
    visibility: [
        ":__subpackages__",
        "//hardware/interfaces/tests/extension/contexthub:__subpackages__",
    ],
}

cc_binary {
    name: "android.hardware.contexthub-service.example",
    relative_install_path: "hw",
    init_rc: ["contexthub-default.rc"],
    vintf_fragments: ["contexthub-default.xml"],
    vendor: true,
    shared_libs: [
        "libbase",
        "libbinder_ndk",
        "android.hardware.contexthub-V3-ndk",
    ],
    static_libs: [
        "libcontexthubexampleimpl",
    ],
    srcs: ["main.cpp"],
}

prebuilt_etc {
    name: "android.hardware.contexthub-service.example.rc",
    src: "android.hardware.contexthub-service.example.rc",
    installable: false,
}

prebuilt_etc {
    name: "contexthub-default.xml",
    src: "contexthub-default.xml",
    sub_dir: "vintf",
    installable: false,
}

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

    binaries: [
        "android.hardware.contexthub-service.example",
    ],
    prebuilts: [
        "android.hardware.contexthub-service.example.rc",
        "contexthub-default.xml",
    ],
}
