summaryrefslogtreecommitdiff
path: root/health/Android.bp
blob: 3b67e1ecf68a49517e497699cdc653cb61e040a0 (plain)
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
package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

cc_library {
    name: "libpixelhealth",
    vendor: true,
    export_include_dirs: ["include"],

    srcs: [
        "BatteryDefender.cpp",
        "BatteryMetricsLogger.cpp",
        "BatteryThermalControl.cpp",
        "ChargerDetect.cpp",
        "CycleCountBackupRestore.cpp",
        "DeviceHealth.cpp",
        "HealthHelper.cpp",
        "LowBatteryShutdownMetrics.cpp",
        "StatsHelper.cpp"
    ],

    cflags: [
        "-Wall",
        "-Werror",
    ],

    static_libs: [
        "libbatterymonitor",
    ],

    whole_static_libs: [
        "android.hardware.health-translate-ndk",
        "android.hardware.health@1.0-convert",
    ],

    export_shared_lib_headers: [
        "android.frameworks.stats-V1-ndk",
        "android.hardware.health-V3-ndk",
        "libpixelatoms_defs",
    ],

    shared_libs: [
        "android.frameworks.stats-V1-ndk",
        "android.hardware.health-V3-ndk",
        "libbase",
        "libbinder_ndk",
        "libcutils",
        "libhidlbase",
        "libpixelatoms_defs",
        "libutils",
    ],
}

cc_test {
    name: "HealthTestCases",

    compile_multilib: "both",
    multilib: {
        lib32: {
            suffix: "32",
        },
        lib64: {
            suffix: "64",
        },
    },

    srcs: [
        "test/TestBatteryDefender.cpp",
    ],

    local_include_dirs: [
        "include/pixelhealth",
    ],

    static_libs: [
        "libgmock",
        "libhidlbase",
        "libpixelhealth",
        "libbatterymonitor",
    ],

    shared_libs: [
        "libbase",
        "libcutils",
        "libutils",
    ],

    test_suites: [
        "device-tests",
    ],
    vendor: true,
}