summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRohit Rangwani <rrangwan@codeaurora.org>2018-06-22 16:02:14 +0530
committerRohit Rangwani <rrangwan@codeaurora.org>2018-06-27 13:06:17 +0530
commit7d158a2d0d6acf3b8954ba699bafd852bd5151bb (patch)
tree9655564af774bdcc56d7c86f16c47564190706b4
parent5ce3dbf6b530b783ec56e68ac2a7a702c792cb05 (diff)
downloadandroid_vendor_nxp_opensource_hidlimpl-7d158a2d0d6acf3b8954ba699bafd852bd5151bb.tar.gz
android_vendor_nxp_opensource_hidlimpl-7d158a2d0d6acf3b8954ba699bafd852bd5151bb.tar.bz2
android_vendor_nxp_opensource_hidlimpl-7d158a2d0d6acf3b8954ba699bafd852bd5151bb.zip
NFC: Binder buffer optimisation
Changes done for optimised binder buffer usage for NFC hal service. Change-Id: I8fbe5b9ea2b29c24289cd92b48d0289311e75232
-rw-r--r--1.0/default/Android.mk1
-rw-r--r--1.0/default/service.cpp3
-rw-r--r--1.1/default/Android.bp1
-rw-r--r--1.1/default/service.cpp3
4 files changed, 6 insertions, 2 deletions
diff --git a/1.0/default/Android.mk b/1.0/default/Android.mk
index 6220ea9..4d218f8 100644
--- a/1.0/default/Android.mk
+++ b/1.0/default/Android.mk
@@ -14,6 +14,7 @@ LOCAL_SHARED_LIBRARIES := \
libdl \
libbase \
libutils \
+ libhwbinder \
libhardware_legacy \
libhardware \
diff --git a/1.0/default/service.cpp b/1.0/default/service.cpp
index d60ba88..37640cb 100644
--- a/1.0/default/service.cpp
+++ b/1.0/default/service.cpp
@@ -31,7 +31,7 @@
#include <android/hardware/nfc/1.0/INfc.h>
#include <vendor/nxp/hardware/nfc/1.0/INqNfc.h>
-
+#include <hwbinder/ProcessState.h>
#include <hidl/LegacySupport.h>
using android::hardware::configureRpcThreadpool;
@@ -42,6 +42,7 @@ using android::hardware::registerPassthroughServiceImplementation;
using android::OK;
int main() {
+ android::hardware::ProcessState::initWithMmapSize((size_t)(8192));
configureRpcThreadpool(1, true /*callerWillJoin*/);
android::status_t status;
status = registerPassthroughServiceImplementation<INfc>();
diff --git a/1.1/default/Android.bp b/1.1/default/Android.bp
index 027ee21..d8c2fb5 100644
--- a/1.1/default/Android.bp
+++ b/1.1/default/Android.bp
@@ -15,6 +15,7 @@ cc_binary {
"libhidltransport",
"libutils",
"liblog",
+ "libhwbinder",
"android.hardware.nfc@1.1",
"android.hardware.nfc@1.0",
"vendor.nxp.hardware.nfc@1.0",
diff --git a/1.1/default/service.cpp b/1.1/default/service.cpp
index c903b83..eb6dd76 100644
--- a/1.1/default/service.cpp
+++ b/1.1/default/service.cpp
@@ -31,7 +31,7 @@
#include <android/hardware/nfc/1.1/INfc.h>
#include <vendor/nxp/hardware/nfc/1.0/INqNfc.h>
-
+#include <hwbinder/ProcessState.h>
#include <hidl/LegacySupport.h>
#include "Nfc.h"
#include "NqNfc.h"
@@ -47,6 +47,7 @@ using android::sp;
using android::status_t;
int main() {
+ android::hardware::ProcessState::initWithMmapSize((size_t)(8192));
configureRpcThreadpool(1, true /*callerWillJoin*/);
status_t status;
sp<INfc> nfc_service = new Nfc();