diff --git a/sensors/Android.bp b/sensors/Android.bp index 839a9ad..323380f 100644 --- a/sensors/Android.bp +++ b/sensors/Android.bp @@ -46,6 +46,7 @@ cc_library_shared { cc_binary { name: "android.hardware.sensors@1.0-service.samsung8974", + defaults: ["hidl_defaults"], relative_install_path: "hw", vendor: true, init_rc: ["android.hardware.sensors@1.0-service.samsung8974.rc"], @@ -59,6 +60,12 @@ cc_binary { "libutils", "libhidlbase", "libhidltransport", + "libhwbinder", "android.hardware.sensors@1.0", ], + arch: { + arm: { + cflags: ["-DARCH_ARM_32"], + }, + }, } diff --git a/sensors/service.cpp b/sensors/service.cpp index 65f6d81..72f32fd 100644 --- a/sensors/service.cpp +++ b/sensors/service.cpp @@ -18,11 +18,17 @@ #include #include +#ifdef ARCH_ARM_32 +#include +#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.