Create native version of Thermal Throttling API.
Create native thermal manager API of thermal mananger service.
Export libthermal NDK library.
Bug: 137151587
Bug: 136285293
Test: build, atest thermalmanager-test
Change-Id: I1ec7c746f7e814c701b306e06fe08c3641c39e88
diff --git a/services/powermanager/Android.bp b/services/powermanager/Android.bp
index 7b3af70..3e0f136 100644
--- a/services/powermanager/Android.bp
+++ b/services/powermanager/Android.bp
@@ -1,11 +1,25 @@
cc_library_shared {
name: "libpowermanager",
- srcs: ["IPowerManager.cpp"],
+ srcs: [
+ "IPowerManager.cpp",
+ "Temperature.cpp",
+ "CoolingDevice.cpp",
+ ":libpowermanager_aidl",
+ ],
+
+ aidl: {
+ local_include_dirs: ["."],
+ include_dirs: [
+ "frameworks/base/core/java/android/os",
+ ],
+ export_aidl_headers: true
+ },
shared_libs: [
"libutils",
"libbinder",
+ "liblog"
],
cflags: [
@@ -15,3 +29,22 @@
"-Wunreachable-code",
],
}
+
+cc_test {
+ name: "thermalmanager-test",
+ srcs: ["IThermalManagerTest.cpp",
+ ],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wextra",
+ ],
+ shared_libs: [
+ "libbase",
+ "libhidlbase",
+ "liblog",
+ "libpowermanager",
+ "libbinder",
+ "libutils",
+ ],
+}