summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk5
-rw-r--r--service.cpp7
2 files changed, 12 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 7f3cdb8..645c0a2 100644
--- a/Android.mk
+++ b/Android.mk
@@ -13,6 +13,7 @@ LOCAL_SHARED_LIBRARIES := \
libbase \
libhidlbase \
libhidltransport \
+ libhwbinder \
libutils \
android.hardware.power@1.2
@@ -126,6 +127,10 @@ ifeq ($(TARGET_USES_INTERACTION_BOOST),true)
LOCAL_CFLAGS += -DINTERACTION_BOOST
endif
+ifeq ($(TARGET_ARCH),arm)
+ LOCAL_CFLAGS += -DARCH_ARM_32
+endif
+
LOCAL_MODULE := android.hardware.power@1.2-service-qti
LOCAL_INIT_RC := android.hardware.power@1.2-service-qti.rc
LOCAL_MODULE_TAGS := optional
diff --git a/service.cpp b/service.cpp
index c8100b9..85f84d1 100644
--- a/service.cpp
+++ b/service.cpp
@@ -31,6 +31,9 @@
#include <hardware/power.h>
#include <hidl/HidlTransportSupport.h>
+#ifdef ARCH_ARM_32
+#include <hwbinder/ProcessState.h>
+#endif
#include <log/log.h>
#include "Power.h"
@@ -47,6 +50,10 @@ using android::hardware::power::V1_2::IPower;
using android::hardware::power::V1_2::implementation::Power;
int main() {
+#ifdef ARCH_ARM_32
+ android::hardware::ProcessState::initWithMmapSize((size_t)16384);
+#endif
+
status_t status;
android::sp<IPower> service = nullptr;