Yifan Hong | 4db762a | 2018-07-10 15:49:21 -0700 | [diff] [blame] | 1 | cc_defaults { |
| 2 | name: "android.hardware.health@2.0-impl_defaults", |
Hridya Valsaraju | d3e3d72 | 2017-12-11 17:31:00 -0800 | [diff] [blame] | 3 | |
Yifan Hong | 4db762a | 2018-07-10 15:49:21 -0700 | [diff] [blame] | 4 | recovery_available: true, |
| 5 | cflags: [ |
| 6 | "-Wall", |
| 7 | "-Werror", |
| 8 | ], |
Hridya Valsaraju | d3e3d72 | 2017-12-11 17:31:00 -0800 | [diff] [blame] | 9 | |
| 10 | shared_libs: [ |
| 11 | "libbase", |
| 12 | "libhidlbase", |
| 13 | "libhidltransport", |
| 14 | "libhwbinder", |
| 15 | "liblog", |
| 16 | "libutils", |
| 17 | "libcutils", |
| 18 | "android.hardware.health@2.0", |
| 19 | ], |
| 20 | |
| 21 | static_libs: [ |
| 22 | "libbatterymonitor", |
| 23 | "android.hardware.health@1.0-convert", |
| 24 | ], |
| 25 | } |
Yifan Hong | 4db762a | 2018-07-10 15:49:21 -0700 | [diff] [blame] | 26 | |
| 27 | // Helper library for implementing health HAL. It is recommended that a health |
| 28 | // service or passthrough HAL link to this library. |
| 29 | cc_library_static { |
| 30 | name: "android.hardware.health@2.0-impl", |
| 31 | defaults: ["android.hardware.health@2.0-impl_defaults"], |
| 32 | |
| 33 | vendor_available: true, |
| 34 | srcs: [ |
| 35 | "Health.cpp", |
Yifan Hong | 50c9e25 | 2019-10-03 16:26:13 -0700 | [diff] [blame^] | 36 | "healthd_common_adapter.cpp", |
| 37 | ], |
| 38 | |
| 39 | whole_static_libs: [ |
| 40 | "libhealthloop", |
Yifan Hong | 4db762a | 2018-07-10 15:49:21 -0700 | [diff] [blame] | 41 | ], |
| 42 | |
| 43 | export_include_dirs: ["include"], |
| 44 | } |
| 45 | |
| 46 | // Default passthrough implementation for recovery. Vendors can implement |
| 47 | // android.hardware.health@2.0-impl-recovery-<device> to customize the behavior |
| 48 | // of the HAL in recovery. |
| 49 | // The implementation does NOT start the uevent loop for polling. |
| 50 | cc_library_shared { |
| 51 | name: "android.hardware.health@2.0-impl-default", |
| 52 | defaults: ["android.hardware.health@2.0-impl_defaults"], |
| 53 | |
| 54 | recovery_available: true, |
| 55 | relative_install_path: "hw", |
| 56 | |
| 57 | static_libs: [ |
| 58 | "android.hardware.health@2.0-impl", |
| 59 | "libhealthstoragedefault", |
| 60 | ], |
| 61 | |
| 62 | srcs: [ |
| 63 | "HealthImplDefault.cpp", |
| 64 | ], |
| 65 | } |