Add plumbing for ADPF Power Efficiency hint
These patches introduce a new power efficiency mode for hint sessions
to the public API, and internally expose a new setMode API for hint
sessions that resembles the setMode API for iPower, to control
different session operating modes.
This set of patches:
- Updates the PowerHAL AIDL to version 5, and updates relevant bp files
- Exposes new setPreferPowerEfficiency(bool enabled) method from the
SDK and NDK
- Exposes new setMode(int mode, bool enabled) method from PowerHAL AIDL
and HintManagerService
- Adds support for new setMode call in PowerHAL
Bug: b/288117936
Test: atest cts/tests/tests/os/src/android/os/cts/PerformanceHintManagerTest.java
Test: atest HintManagerServiceTest
Change-Id: Ia1349e1bd8c4c85276788892b69897b5ef267c03
diff --git a/native/android/Android.bp b/native/android/Android.bp
index 254eb44..7f3792d 100644
--- a/native/android/Android.bp
+++ b/native/android/Android.bp
@@ -46,7 +46,10 @@
cc_library_shared {
name: "libandroid",
- defaults: ["libandroid_defaults"],
+ defaults: [
+ "libandroid_defaults",
+ "android.hardware.power-ndk_shared",
+ ],
srcs: [
"activity_manager.cpp",
@@ -95,7 +98,6 @@
"libpowermanager",
"android.hardware.configstore@1.0",
"android.hardware.configstore-utils",
- "android.hardware.power-V4-ndk",
"libnativedisplay",
],