1package {
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 "frameworks_native_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["frameworks_native_license"],
8}
9
10cc_library_shared {
11    name: "libpowermanager",
12    defaults: ["android.hardware.power-ndk_export_shared"],
13    srcs: [
14        "BatterySaverPolicyConfig.cpp",
15        "CoolingDevice.cpp",
16        "ParcelDuration.cpp",
17        "PowerHalController.cpp",
18        "PowerHalLoader.cpp",
19        "PowerHalWrapper.cpp",
20        "PowerHintSessionWrapper.cpp",
21        "PowerSaveState.cpp",
22        "Temperature.cpp",
23        "WorkSource.cpp",
24        ":libpowermanager_aidl",
25    ],
26
27    aidl: {
28        local_include_dirs: ["include"],
29        include_dirs: [
30            "frameworks/base/core/java/android/os",
31        ],
32        export_aidl_headers: true,
33    },
34
35    shared_libs: [
36        "libbinder",
37        "libbinder_ndk",
38        "libhidlbase",
39        "liblog",
40        "libutils",
41        "android.hardware.power@1.0",
42        "android.hardware.power@1.1",
43        "android.hardware.power@1.2",
44        "android.hardware.power@1.3",
45    ],
46
47    export_shared_lib_headers: [
48        "android.hardware.power@1.0",
49        "android.hardware.power@1.1",
50        "android.hardware.power@1.2",
51        "android.hardware.power@1.3",
52    ],
53
54    whole_static_libs: [
55        "android.os.hintmanager_aidl-ndk",
56    ],
57
58    cflags: [
59        "-Wall",
60        "-Werror",
61        "-Wunused",
62        "-Wunreachable-code",
63    ],
64
65    local_include_dirs: ["include"],
66    export_include_dirs: [
67        "include",
68    ],
69}
70