summaryrefslogtreecommitdiff
path: root/health/2.0/default/Android.bp
blob: 73cd55305874db0a052c3c70a2a74f6d87ad211f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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_defaults {
    name: "android.hardware.health@2.0-impl_defaults",

    recovery_available: true,
    cflags: [
        "-Wall",
        "-Werror",
    ],

    shared_libs: [
        "libbase",
        "libhidlbase",
        "liblog",
        "libutils",
        "libcutils",
        "android.hardware.health@2.0",
    ],

    static_libs: [
        "libbatterymonitor",
        "android.hardware.health@1.0-convert",
    ],
}

// Helper library for implementing health HAL. It is recommended that a health
// service or passthrough HAL link to this library.
cc_library_static {
    name: "android.hardware.health@2.0-impl",
    defaults: ["android.hardware.health@2.0-impl_defaults"],

    vendor_available: true,
    srcs: [
        "Health.cpp",
        "healthd_common_adapter.cpp",
    ],

    whole_static_libs: [
        "libhealthloop",
    ],

    export_include_dirs: ["include"],
}

// Default passthrough implementation for recovery. Vendors can implement
// android.hardware.health@2.0-impl-recovery-<device> to customize the behavior
// of the HAL in recovery.
// The implementation does NOT start the uevent loop for polling.
cc_library_shared {
    name: "android.hardware.health@2.0-impl-default",
    defaults: ["android.hardware.health@2.0-impl_defaults"],

    recovery_available: true,
    relative_install_path: "hw",

    static_libs: [
        "android.hardware.health@2.0-impl",
        "libhealthstoragedefault",
    ],

    srcs: [
        "HealthImplDefault.cpp",
    ],
}