summaryrefslogtreecommitdiffstats
path: root/service.cpp
diff options
context:
space:
mode:
authorVinay Verma <vvinay@codeaurora.org>2018-09-14 11:25:46 +0530
committerMichael Bestas <mkbestas@lineageos.org>2019-10-23 01:12:56 +0300
commit9a3da74f9ce4b124a2bc8c9ddb001afbbb3d662d (patch)
treefab740f7ba9ddb854698996603c5f11a35e7c4a6 /service.cpp
parentc0c5b02c1fb92a59f3a285ad6183e28e4bad107a (diff)
downloadvendor_qcom_opensource_power-9a3da74f9ce4b124a2bc8c9ddb001afbbb3d662d.tar.gz
vendor_qcom_opensource_power-9a3da74f9ce4b124a2bc8c9ddb001afbbb3d662d.tar.bz2
vendor_qcom_opensource_power-9a3da74f9ce4b124a2bc8c9ddb001afbbb3d662d.zip
Reduce hwbinder buffer size for power HAL
Set hwbinder buffer size to 16KB for 32 bit architecture. Change-Id: I4272a12853269dd6363f58a5bb81caa09cc47e9a CRs-Fixed: 2315283
Diffstat (limited to 'service.cpp')
-rw-r--r--service.cpp7
1 files changed, 7 insertions, 0 deletions
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;