-
Notifications
You must be signed in to change notification settings - Fork 0
/
Android.bp
116 lines (112 loc) · 3.18 KB
/
Android.bp
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
113
114
115
116
cc_binary {
name: "android.hardware.health@2.0-service.sony",
init_rc: ["android.hardware.health@2.0-service.sony.rc"],
vendor: true,
relative_install_path: "hw",
cflags: [
"-Wall",
"-Werror",
],
srcs: [
"HealthService.cpp",
],
static_libs: [
"android.hardware.health@2.0-impl",
"android.hardware.health@1.0-convert",
"libbatterymonitor", // libhealthservice is needed for health_service_main()
"libhealthservice", // Storage is needed by the HAL definition, use default
"libhealthboardcommon.sony",
"libhealthd.sony",
"libhealthstoragedefault",
],
shared_libs: [
"android.hardware.health@2.0",
"libbase",
"libcutils",
"libhidlbase",
"libhidltransport",
"libhwbinder",
"libutils",
],
// HealthService.cpp never uses healthd_board_* functions, so the compiler
// drops them. But BatteryMonitor.cpp and Health.cpp depend on those
// functions to be defined(not only declared).
whole_static_libs: [
"libhealthd.sony",
],
// Only availbale in current Android Q master.
// Nead to remove health section from common/vintf/manifext.xml as well
// once we decide to use this instead.
//vintf_fragments: [
// "manifest_android.hardware.health@2.0.xml",
//],
overrides: [
"healthd",
],
}
cc_library_static {
// Vendor-specific functions
name: "libhealthboardcommon.sony",
// recovery_available is not yet available in Pie, need to use master or wait for Q
//recovery_available: true,
vendor_available: true,
cflags: [
"-Wall",
"-Werror",
"-fexceptions",
],
srcs: [
"CycleCountBackupRestore.cpp",
"HealthBoardCommon.cpp",
"LearnedCapacityBackupRestore.cpp",
],
shared_libs: [
"android.hardware.health@2.0",
"libbase",
"libcutils",
"libhidlbase",
"libhidltransport",
"libhwbinder",
"liblog",
"libutils",
],
header_libs: [
// We only need BatteryService.h for the common lib
"libbatteryservice_headers",
],
// Needed to find own headers
local_include_dirs: ["include"],
}
cc_library_static {
// Shim lib that maps legacy healthd_board_* hooks to vendor lib functions
// Needed until the upstream health rework is complete
name: "libhealthd.sony",
// recovery_available is not yet available in Pie, need to use master or wait for Q
//recovery_available: true,
vendor_available: true,
cflags: [
"-Wall",
"-Werror",
],
shared_libs: [
"android.hardware.health@2.0",
"libbase",
"libcutils",
"libhidlbase",
"libhidltransport",
"libhwbinder",
"liblog",
"libutils",
],
srcs: [
"libhealthd_board.cpp",
],
header_libs: [
// To access healthd/healthd.h and BatteryService.h in libhealthd_board.h
"libhealthd_headers",
],
// Needed to find own headers
local_include_dirs: ["include"],
// Let HealthService find headers
export_include_dirs: ["include"],
}