From 7076970687adffff5d395f5d59065d8d18dd1372 Mon Sep 17 00:00:00 2001 From: Vaisakh Murali Date: Sat, 29 Jun 2024 13:50:58 +0530 Subject: [PATCH] sky: Update extension for libperfmgr Change-Id: I1c1271739980f806a4109a47b5b3fe4d7fff8440 --- BoardConfig.mk | 2 +- power/Android.bp | 11 +++++++++++ power/power-mode.cpp | 6 ++++-- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 power/Android.bp diff --git a/BoardConfig.mk b/BoardConfig.mk index 2198d48..fba7f65 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -197,7 +197,7 @@ TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true TARGET_USERIMAGES_SPARSE_F2FS_DISABLED := true # Power -TARGET_POWERHAL_MODE_EXT := $(DEVICE_PATH)/power/power-mode.cpp +TARGET_POWER_LIBPERFMGR_MODE_EXTENSION_LIB := //$(DEVICE_PATH):libperfmgr-ext-sky # Properties TARGET_ODM_PROP += $(DEVICE_PATH)/configs/properties/odm.prop diff --git a/power/Android.bp b/power/Android.bp new file mode 100644 index 0000000..a3dbee4 --- /dev/null +++ b/power/Android.bp @@ -0,0 +1,11 @@ +cc_library_static { + name: "libperfmgr-ext-sky", + vendor: true, + srcs: [ + "power-mode.cpp", + ], + shared_libs: [ + "android.hardware.power-V4-ndk", + "libbase", + ], +} diff --git a/power/power-mode.cpp b/power/power-mode.cpp index aa23f67..b0672a5 100644 --- a/power/power-mode.cpp +++ b/power/power-mode.cpp @@ -45,10 +45,11 @@ int open_ts_input() { } // anonymous namespace namespace aidl { -namespace android { +namespace google { namespace hardware { namespace power { namespace impl { +namespace pixel { static constexpr int kInputEventWakeupModeOff = 4; static constexpr int kInputEventWakeupModeOn = 5; @@ -87,8 +88,9 @@ bool setDeviceSpecificMode(Mode type, bool enabled) { } } +} // namespace pixel } // namespace impl } // namespace power } // namespace hardware -} // namespace android +} // namespace google } // namespace aidl