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