platform_system_core/healthd/Android.bp

370 lines
8 KiB
Text
Raw Normal View History

[LSC] Add LOCAL_LICENSE_KINDS to system/core Added SPDX-license-identifier-Apache-2.0 to: bootstat/Android.bp cli-test/Android.bp code_coverage/Android.bp cpio/Android.bp debuggerd/crasher/Android.bp debuggerd/proto/Android.bp diagnose_usb/Android.bp fs_mgr/libdm/Android.bp fs_mgr/libfiemap/Android.bp fs_mgr/liblp/Android.bp fs_mgr/libsnapshot/Android.bp fs_mgr/libstorage_literals/Android.bp fs_mgr/libvbmeta/Android.bp fs_mgr/tests/Android.bp fs_mgr/tools/Android.bp gatekeeperd/Android.bp healthd/Android.bp healthd/testdata/Android.bp init/Android.bp init/Android.mk init/sysprop/Android.bp init/test_kill_services/Android.bp init/test_service/Android.bp libappfuse/Android.bp libasyncio/Android.bp libbinderwrapper/Android.bp libcrypto_utils/Android.bp libcrypto_utils/tests/Android.bp libdiskconfig/Android.bp libgrallocusage/Android.bp libkeyutils/mini_keyctl/Android.bp libmodprobe/Android.bp libnetutils/Android.bp libpackagelistparser/Android.bp libprocessgroup/Android.bp libprocessgroup/cgrouprc/Android.bp libprocessgroup/cgrouprc_format/Android.bp libprocessgroup/profiles/Android.bp libprocessgroup/setup/Android.bp libqtaguid/Android.bp libsparse/Android.bp libstats/push_compat/Android.bp libsuspend/Android.bp libsync/Android.bp libsystem/Android.bp libsysutils/Android.bp libusbhost/Android.bp libutils/Android.bp libvndksupport/Android.bp libvndksupport/tests/Android.bp llkd/Android.bp llkd/tests/Android.bp property_service/libpropertyinfoparser/Android.bp property_service/libpropertyinfoserializer/Android.bp property_service/property_info_checker/Android.bp qemu_pipe/Android.bp reboot/Android.bp rootdir/Android.bp rootdir/Android.mk rootdir/avb/Android.bp rootdir/avb/Android.mk run-as/Android.bp sdcard/Android.bp set-verity-state/Android.bp shell_and_utilities/Android.bp storaged/Android.bp toolbox/Android.bp trusty/apploader/Android.bp trusty/confirmationui/Android.bp trusty/confirmationui/fuzz/Android.bp trusty/coverage/Android.bp trusty/fuzz/Android.bp trusty/fuzz/test/Android.bp trusty/gatekeeper/Android.bp trusty/gatekeeper/fuzz/Android.bp trusty/keymaster/Android.bp trusty/keymaster/fuzz/Android.bp trusty/libtrusty/Android.bp trusty/libtrusty/tipc-test/Android.bp trusty/secure_dpu/Android.bp trusty/storage/interface/Android.bp trusty/storage/lib/Android.bp trusty/storage/proxy/Android.bp trusty/storage/tests/Android.bp trusty/utils/spiproxyd/Android.bp trusty/utils/trusty-ut-ctrl/Android.bp usbd/Android.bp watchdogd/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: debuggerd/Android.bp fastboot/Android.bp libkeyutils/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-MIT to: libcutils/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT to: fs_mgr/Android.bp fs_mgr/libfs_avb/Android.bp trusty/Android.bp trusty/utils/rpmb_dev/Android.bp Added SPDX-license-identifier-BSD to: fastboot/fuzzy_fastboot/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Id740a7d2884556081fdb68876584b25eb95e1bef
2021-02-17 04:02:14 +01:00
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
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",
// Need HealthInfo definition from headers of these shared
// libraries. Clients don't need to link to these.
"android.hardware.health@2.1",
"android.hardware.health-V1-ndk",
],
whole_static_libs: [
// Need to translate HIDL to AIDL to support legacy APIs in
// BatteryMonitor.
"android.hardware.health-translate-ndk",
],
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",
"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",
],
}
cc_library_static {
name: "libhealthd_charger_nops",
recovery_available: true,
srcs: [
"healthd_mode_charger_nops.cpp",
],
cflags: [
"-Wall",
"-Werror",
],
header_libs: [
"libhealthd_headers",
],
static_libs: [
"libhealthloop",
"libhealth2impl",
],
shared_libs: [
"android.hardware.health@2.1",
"libutils",
],
}
sysprop_library {
name: "charger_sysprop",
recovery_available: true,
srcs: ["charger.sysprop"],
property_owner: "Platform",
api_packages: ["android.sysprop"],
}
cc_library_static {
name: "libhealthd_draw",
vendor_available: true,
export_include_dirs: ["."],
static_libs: [
"libcharger_sysprop",
"libminui",
],
shared_libs: [
"libbase",
],
header_libs: ["libbatteryservice_headers"],
srcs: ["healthd_draw.cpp"],
target: {
vendor: {
exclude_static_libs: [
"libcharger_sysprop",
],
},
},
}
cc_library_static {
name: "libhealthd_charger_ui",
vendor_available: true,
export_include_dirs: [
"include",
"include_charger",
],
static_libs: [
"android.hardware.health-V1-ndk",
"android.hardware.health-translate-ndk",
"libcharger_sysprop",
"libhealthd_draw",
"libhealthloop",
"libminui",
],
shared_libs: [
"libbase",
"libcutils",
"liblog",
"libpng",
"libsuspend",
"libutils",
],
header_libs: [
"libhealthd_headers",
],
export_static_lib_headers: [
"android.hardware.health-V1-ndk",
],
srcs: [
"healthd_mode_charger.cpp",
"AnimationParser.cpp",
],
target: {
vendor: {
exclude_static_libs: [
"libcharger_sysprop",
],
},
},
}
cc_library_static {
name: "libhealthd_charger",
export_include_dirs: [
"include",
"include_charger",
],
static_libs: [
"android.hardware.health@1.0-convert",
"libcharger_sysprop",
"libhealth2impl",
"libhealthd_charger_ui",
],
shared_libs: [
"android.hardware.health@2.1",
"libbase",
"libcutils",
"liblog",
"libutils",
],
srcs: [
"healthd_mode_charger_hidl.cpp",
],
}
cc_defaults {
name: "charger_defaults",
local_include_dirs: [
"include_charger",
],
cflags: [
"-Wall",
"-Werror",
],
shared_libs: [
// common
"libbase",
"libcutils",
"libhidlbase",
"liblog",
"libutils",
// system charger only
"libpng",
],
static_libs: [
// common
"android.hardware.health@1.0-convert",
"android.hardware.health-V1-ndk",
"libbatterymonitor",
"libcharger_sysprop",
"libhealthd_charger_nops",
"libhealthloop",
"libhealth2impl",
// system charger only
"libhealthd_draw",
"libhealthd_charger",
"libhealthd_charger_ui",
"libminui",
"libsuspend",
],
}
cc_binary {
name: "charger",
defaults: ["charger_defaults"],
recovery_available: true,
srcs: [
"charger.cpp",
"charger_utils.cpp",
],
shared_libs: [
"android.hardware.health@2.0",
"android.hardware.health@2.1",
],
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",
"libhealthd_charger_ui",
"libminui",
"libsuspend",
],
}
}
}
cc_test {
name: "charger_test",
defaults: ["charger_defaults"],
srcs: ["charger_test.cpp"],
static_libs: [
"android.hardware.health@1.0",
"android.hardware.health@2.0",
"android.hardware.health@2.1",
],
}
cc_test {
name: "libhealthd_charger_test",
defaults: ["charger_defaults"],
srcs: [
"AnimationParser_test.cpp",
"healthd_mode_charger_test.cpp"
],
static_libs: [
"android.hardware.health@1.0",
"android.hardware.health@2.0",
"android.hardware.health@2.1",
"libgmock",
],
test_suites: [
"general-tests",
"device-tests",
],
data: [
":libhealthd_charger_test_data",
],
require_root: true,
}
// /system/etc/res/images/charger/battery_fail.png
prebuilt_etc {
name: "system_core_charger_res_images_battery_fail.png",
src: "images/battery_fail.png",
relative_install_path: "res/images/charger",
filename: "battery_fail.png",
}
// /system/etc/res/images/charger/battery_scale.png
prebuilt_etc {
name: "system_core_charger_res_images_battery_scale.png",
src: "images/battery_scale.png",
relative_install_path: "res/images/charger",
filename: "battery_scale.png",
}
phony {
name: "charger_res_images",
required: [
"system_core_charger_res_images_battery_fail.png",
"system_core_charger_res_images_battery_scale.png",
],
}
// /vendor/etc/res/images/default/charger/battery_fail.png
prebuilt_etc {
name: "system_core_charger_res_images_battery_fail.png_default_vendor",
src: "images/battery_fail.png",
relative_install_path: "res/images/default/charger",
vendor: true,
filename: "battery_fail.png",
}
// /vendor/etc/res/images/default/charger/battery_scale.png
prebuilt_etc {
name: "system_core_charger_res_images_battery_scale.png_default_vendor",
src: "images/battery_scale.png",
relative_install_path: "res/images/default/charger",
vendor: true,
filename: "battery_scale.png",
}
phony {
name: "charger_res_images_vendor",
required: [
"system_core_charger_res_images_battery_fail.png_default_vendor",
"system_core_charger_res_images_battery_scale.png_default_vendor",
],
}