• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5cc_library {
6    name: "libpixelhealth",
7    vendor: true,
8    export_include_dirs: ["include"],
9
10    srcs: [
11        "BatteryDefender.cpp",
12        "BatteryMetricsLogger.cpp",
13        "BatteryThermalControl.cpp",
14        "ChargerDetect.cpp",
15        "CycleCountBackupRestore.cpp",
16        "DeviceHealth.cpp",
17        "HealthHelper.cpp",
18        "LowBatteryShutdownMetrics.cpp",
19        "StatsHelper.cpp"
20    ],
21
22    cflags: [
23        "-Wall",
24        "-Werror",
25    ],
26
27    static_libs: [
28        "libbatterymonitor",
29    ],
30
31    whole_static_libs: [
32        "android.hardware.health-translate-ndk",
33        "android.hardware.health@1.0-convert",
34    ],
35
36    export_shared_lib_headers: [
37        "android.frameworks.stats-V1-ndk",
38        "android.hardware.health-V1-ndk",
39        "pixelatoms-cpp",
40    ],
41
42    shared_libs: [
43        "android.frameworks.stats-V1-ndk",
44        "android.hardware.health-V1-ndk",
45        "libbase",
46        "libbinder_ndk",
47        "libcutils",
48        "libhidlbase",
49        "libprotobuf-cpp-lite",
50        "libutils",
51        "pixelatoms-cpp",
52    ],
53}
54
55cc_test {
56    name: "HealthTestCases",
57
58    compile_multilib: "both",
59    multilib: {
60        lib32: {
61            suffix: "32",
62        },
63        lib64: {
64            suffix: "64",
65        },
66    },
67
68    srcs: [
69        "test/TestBatteryDefender.cpp",
70    ],
71
72    local_include_dirs: [
73        "include/pixelhealth",
74    ],
75
76    static_libs: [
77        "libgmock",
78        "libhidlbase",
79        "libpixelhealth",
80        "libbatterymonitor",
81    ],
82
83    shared_libs: [
84        "libbase",
85        "libcutils",
86        "libutils",
87    ],
88
89    test_suites: [
90        "device-tests",
91    ],
92    vendor: true,
93}
94