2017-07-11 01:05:51 +02:00
|
|
|
cc_library_headers {
|
|
|
|
name: "libhealthd_headers",
|
|
|
|
vendor_available: true,
|
2018-07-10 22:02:18 +02:00
|
|
|
recovery_available: true,
|
2017-07-11 01:05:51 +02:00
|
|
|
export_include_dirs: ["include"],
|
|
|
|
header_libs: ["libbatteryservice_headers"],
|
|
|
|
export_header_lib_headers: ["libbatteryservice_headers"],
|
|
|
|
}
|
2017-06-01 23:34:29 +02:00
|
|
|
|
|
|
|
cc_library_static {
|
|
|
|
name: "libbatterymonitor",
|
|
|
|
srcs: ["BatteryMonitor.cpp"],
|
2017-11-29 23:24:50 +01:00
|
|
|
cflags: ["-Wall", "-Werror"],
|
2017-06-01 23:34:29 +02:00
|
|
|
vendor_available: true,
|
2018-07-10 22:02:18 +02:00
|
|
|
recovery_available: true,
|
2017-06-01 23:34:29 +02:00
|
|
|
export_include_dirs: ["include"],
|
|
|
|
shared_libs: [
|
|
|
|
"libutils",
|
|
|
|
"libbase",
|
2019-10-07 20:18:04 +02:00
|
|
|
|
|
|
|
// Need latest HealthInfo definition from headers of this shared
|
|
|
|
// library. Clients don't need to link to this.
|
|
|
|
"android.hardware.health@2.1",
|
2017-06-01 23:34:29 +02:00
|
|
|
],
|
|
|
|
header_libs: ["libhealthd_headers"],
|
|
|
|
export_header_lib_headers: ["libhealthd_headers"],
|
|
|
|
}
|
2017-09-20 02:57:50 +02:00
|
|
|
|
2018-04-04 23:08:57 +02:00
|
|
|
cc_defaults {
|
|
|
|
name: "android.hardware.health@2.0-service_defaults",
|
2017-09-20 02:57:50 +02:00
|
|
|
|
2017-11-29 23:24:50 +01:00
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
],
|
2017-09-20 02:57:50 +02:00
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
"android.hardware.health@2.0-impl",
|
|
|
|
"android.hardware.health@1.0-convert",
|
2018-01-20 00:53:25 +01:00
|
|
|
"libhealthservice",
|
2018-01-11 01:14:28 +01:00
|
|
|
"libhealthstoragedefault",
|
2017-09-20 02:57:50 +02:00
|
|
|
"libbatterymonitor",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
|
|
|
"libhidlbase",
|
|
|
|
"liblog",
|
|
|
|
"libutils",
|
|
|
|
"android.hardware.health@2.0",
|
|
|
|
],
|
|
|
|
}
|
2017-09-26 02:25:00 +02:00
|
|
|
|
2018-04-04 23:08:57 +02:00
|
|
|
cc_binary {
|
|
|
|
name: "android.hardware.health@2.0-service",
|
|
|
|
defaults: ["android.hardware.health@2.0-service_defaults"],
|
2018-05-01 23:59:43 +02:00
|
|
|
|
2018-07-10 22:07:08 +02:00
|
|
|
vendor: true,
|
|
|
|
relative_install_path: "hw",
|
|
|
|
init_rc: ["android.hardware.health@2.0-service.rc"],
|
|
|
|
srcs: [
|
|
|
|
"HealthServiceDefault.cpp",
|
|
|
|
],
|
|
|
|
|
2018-05-01 23:59:43 +02:00
|
|
|
overrides: [
|
|
|
|
"healthd",
|
|
|
|
]
|
2018-04-04 23:08:57 +02:00
|
|
|
}
|
|
|
|
|
2017-09-26 02:25:00 +02:00
|
|
|
cc_binary {
|
|
|
|
name: "healthd",
|
2018-07-10 22:07:08 +02:00
|
|
|
defaults: ["android.hardware.health@2.0-service_defaults"],
|
|
|
|
|
2018-04-04 23:08:04 +02:00
|
|
|
init_rc: ["healthd.rc"],
|
2017-11-07 01:47:54 +01:00
|
|
|
srcs: [
|
|
|
|
"HealthServiceHealthd.cpp",
|
|
|
|
],
|
2017-09-26 02:25:00 +02:00
|
|
|
local_include_dirs: ["include"],
|
|
|
|
|
|
|
|
shared_libs: [
|
2017-11-07 01:48:36 +01:00
|
|
|
"android.hardware.health@1.0",
|
2017-09-26 02:25:00 +02:00
|
|
|
],
|
|
|
|
|
2018-04-28 00:03:32 +02:00
|
|
|
vintf_fragments: [
|
|
|
|
"manifest_healthd.xml"
|
|
|
|
],
|
2017-09-26 02:25:00 +02:00
|
|
|
}
|
2018-09-11 19:46:35 +02:00
|
|
|
|
|
|
|
cc_library_static {
|
|
|
|
name: "libhealthd_charger_nops",
|
2019-10-09 02:27:11 +02:00
|
|
|
recovery_available: true,
|
2018-09-11 19:46:35 +02:00
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"healthd_mode_charger_nops.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
],
|
|
|
|
|
|
|
|
header_libs: [
|
|
|
|
"libhealthd_headers",
|
|
|
|
],
|
|
|
|
|
|
|
|
static_libs: [
|
2019-10-09 02:27:11 +02:00
|
|
|
"libhealthloop",
|
|
|
|
"libhealth2impl",
|
2018-09-11 19:46:35 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
2019-10-09 02:27:11 +02:00
|
|
|
"android.hardware.health@2.1",
|
2018-09-11 19:46:35 +02:00
|
|
|
"libutils",
|
|
|
|
],
|
|
|
|
}
|
2019-07-03 20:07:37 +02:00
|
|
|
|
|
|
|
sysprop_library {
|
|
|
|
name: "charger_sysprop",
|
2019-10-09 02:27:11 +02:00
|
|
|
recovery_available: true,
|
2019-07-03 20:07:37 +02:00
|
|
|
srcs: ["charger.sysprop"],
|
|
|
|
property_owner: "Platform",
|
|
|
|
api_packages: ["android.sysprop"],
|
|
|
|
}
|
2019-07-03 20:40:08 +02:00
|
|
|
|
|
|
|
cc_library_static {
|
|
|
|
name: "libhealthd_draw",
|
|
|
|
export_include_dirs: ["."],
|
|
|
|
static_libs: [
|
|
|
|
"libcharger_sysprop",
|
|
|
|
"libminui",
|
|
|
|
],
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
],
|
|
|
|
header_libs: ["libbatteryservice_headers"],
|
|
|
|
|
|
|
|
srcs: ["healthd_draw.cpp"],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_library_static {
|
|
|
|
name: "libhealthd_charger",
|
|
|
|
local_include_dirs: ["include"],
|
|
|
|
export_include_dirs: [".", "include"],
|
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
"android.hardware.health@1.0-convert",
|
|
|
|
"libcharger_sysprop",
|
|
|
|
"libhealthd_draw",
|
2019-10-09 02:27:11 +02:00
|
|
|
"libhealthloop",
|
|
|
|
"libhealth2impl",
|
2019-07-03 20:40:08 +02:00
|
|
|
"libminui",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
2019-10-09 02:27:11 +02:00
|
|
|
"android.hardware.health@2.1",
|
2019-07-03 20:40:08 +02:00
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
|
|
|
"liblog",
|
|
|
|
"libpng",
|
|
|
|
"libsuspend",
|
|
|
|
"libutils",
|
|
|
|
],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"healthd_mode_charger.cpp",
|
|
|
|
"AnimationParser.cpp",
|
|
|
|
],
|
|
|
|
}
|
2019-10-09 02:27:11 +02:00
|
|
|
|
|
|
|
cc_defaults {
|
|
|
|
name: "charger_defaults",
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
// common
|
|
|
|
"android.hardware.health@2.0",
|
|
|
|
"android.hardware.health@2.1",
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
|
|
|
"libhidlbase",
|
|
|
|
"liblog",
|
|
|
|
"libutils",
|
|
|
|
|
|
|
|
// system charger only
|
|
|
|
"libpng",
|
|
|
|
],
|
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
// common
|
|
|
|
"android.hardware.health@1.0-convert",
|
|
|
|
"libbatterymonitor",
|
|
|
|
"libcharger_sysprop",
|
|
|
|
"libhealthd_charger_nops",
|
|
|
|
"libhealthloop",
|
|
|
|
"libhealth2impl",
|
|
|
|
|
|
|
|
// system charger only
|
|
|
|
"libhealthd_draw",
|
|
|
|
"libhealthd_charger",
|
|
|
|
"libminui",
|
|
|
|
"libsuspend",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "charger",
|
|
|
|
defaults: ["charger_defaults"],
|
|
|
|
recovery_available: true,
|
|
|
|
srcs: [
|
|
|
|
"charger.cpp",
|
|
|
|
"charger_utils.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
target: {
|
|
|
|
recovery: {
|
|
|
|
// No UI and libsuspend for recovery charger.
|
|
|
|
cflags: [
|
|
|
|
"-DCHARGER_FORCE_NO_UI=1",
|
|
|
|
],
|
|
|
|
exclude_shared_libs: [
|
|
|
|
"libpng",
|
|
|
|
],
|
|
|
|
exclude_static_libs: [
|
|
|
|
"libhealthd_draw",
|
|
|
|
"libhealthd_charger",
|
|
|
|
"libminui",
|
|
|
|
"libsuspend",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_test {
|
|
|
|
name: "charger_test",
|
|
|
|
defaults: ["charger_defaults"],
|
|
|
|
srcs: ["charger_test.cpp"],
|
|
|
|
}
|
2020-08-06 01:25:33 +02:00
|
|
|
|
|
|
|
cc_test {
|
|
|
|
name: "libhealthd_charger_test",
|
|
|
|
srcs: ["AnimationParser_test.cpp"],
|
|
|
|
shared_libs: [
|
|
|
|
"liblog",
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
|
|
|
],
|
|
|
|
static_libs: [
|
|
|
|
"libhealthd_charger",
|
|
|
|
],
|
|
|
|
}
|