summaryrefslogtreecommitdiffstats
path: root/healthd/Android.bp
blob: 2cf6be96db51fd3e45901cc2056db3741ac8bd8c (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
cc_library_headers {
    name: "libhealthd_headers",
    vendor_available: true,
    recovery_available: true,
    export_include_dirs: ["include"],
    header_libs: ["libbatteryservice_headers"],
    export_header_lib_headers: ["libbatteryservice_headers"],
}

cc_library_static {
    name: "libbatterymonitor",
    srcs: ["BatteryMonitor.cpp"],
    cflags: ["-Wall", "-Werror"],
    vendor_available: true,
    recovery_available: true,
    export_include_dirs: ["include"],
    shared_libs: [
        "libutils",
        "libbase",
    ],
    header_libs: ["libhealthd_headers"],
    export_header_lib_headers: ["libhealthd_headers"],
}

cc_defaults {
    name: "android.hardware.health@2.0-service_defaults",

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

    static_libs: [
        "android.hardware.health@2.0-impl",
        "android.hardware.health@1.0-convert",
        "libhealthservice",
        "libhealthstoragedefault",
        "libbatterymonitor",
    ],

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

cc_binary {
    name: "android.hardware.health@2.0-service",
    defaults: ["android.hardware.health@2.0-service_defaults"],

    vendor: true,
    relative_install_path: "hw",
    init_rc: ["android.hardware.health@2.0-service.rc"],
    srcs: [
        "HealthServiceDefault.cpp",
    ],

    overrides: [
        "healthd",
    ]
}

cc_binary {
    name: "healthd",
    defaults: ["android.hardware.health@2.0-service_defaults"],

    init_rc: ["healthd.rc"],
    srcs: [
        "HealthServiceHealthd.cpp",
    ],
    local_include_dirs: ["include"],

    shared_libs: [
        "android.hardware.health@1.0",
    ],

    vintf_fragments: [
        "manifest_healthd.xml"
    ],
}

cc_library_static {
    name: "libhealthd_charger_nops",

    srcs: [
        "healthd_mode_charger_nops.cpp",
    ],

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

    header_libs: [
        "libhealthd_headers",
    ],

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

    shared_libs: [
        "android.hardware.health@2.0",
        "libutils",
    ],
}