mirror of
https://github.com/S3NEO/android_device_samsung_msm8226-common.git
synced 2024-11-06 21:55:45 +00:00
msm8226-common: sensors: Tune binder buffer for sensors HIDL
Setting custom binder buffer size for sensors HIDL service. Change-Id: I83ebdc77ed7aec0e25a975097358440681ca5f11
This commit is contained in:
parent
7e00ac6293
commit
d030676d7b
2 changed files with 13 additions and 0 deletions
|
@ -46,6 +46,7 @@ cc_library_shared {
|
|||
|
||||
cc_binary {
|
||||
name: "android.hardware.sensors@1.0-service.samsung8226",
|
||||
defaults: ["hidl_defaults"],
|
||||
relative_install_path: "hw",
|
||||
vendor: true,
|
||||
init_rc: ["android.hardware.sensors@1.0-service.samsung8226.rc"],
|
||||
|
@ -59,6 +60,12 @@ cc_binary {
|
|||
"libutils",
|
||||
"libhidlbase",
|
||||
"libhidltransport",
|
||||
"libhwbinder",
|
||||
"android.hardware.sensors@1.0",
|
||||
],
|
||||
arch: {
|
||||
arm: {
|
||||
cflags: ["-DARCH_ARM_32"],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -18,11 +18,17 @@
|
|||
|
||||
#include <android/hardware/sensors/1.0/ISensors.h>
|
||||
#include <hidl/LegacySupport.h>
|
||||
#ifdef ARCH_ARM_32
|
||||
#include <hwbinder/ProcessState.h>
|
||||
#endif
|
||||
|
||||
using android::hardware::sensors::V1_0::ISensors;
|
||||
using android::hardware::defaultPassthroughServiceImplementation;
|
||||
|
||||
int main() {
|
||||
#ifdef ARCH_ARM_32
|
||||
android::hardware::ProcessState::initWithMmapSize((size_t)8192);
|
||||
#endif
|
||||
/* Sensors framework service needs at least two threads.
|
||||
* One thread blocks on a "poll"
|
||||
* The second thread is needed for all other HAL methods.
|
||||
|
|
Loading…
Reference in a new issue