diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..a38db64 --- /dev/null +++ b/Android.bp @@ -0,0 +1,3 @@ +subdirs = [ + "sensors", +] diff --git a/board/binder.mk b/board/binder.mk deleted file mode 100644 index 11c1687..0000000 --- a/board/binder.mk +++ /dev/null @@ -1,3 +0,0 @@ -# Binder API version -# This does not work -#TARGET_USES_64_BIT_BINDER := true diff --git a/sensors/Android.bp b/sensors/Android.bp index 0c549c1..c950d79 100644 --- a/sensors/Android.bp +++ b/sensors/Android.bp @@ -1,10 +1,9 @@ - cc_library_static { name: "multihal-samsung8226", vendor: true, srcs: [ "multihal.cpp", - "SensorEventQueue.cpp", + "SensorEventQueue.cpp" ], header_libs: [ "libhardware_headers", @@ -13,102 +12,9 @@ cc_library_static { "liblog", "libcutils", "libutils", - "libdl", + "libdl" ], export_include_dirs: ["."], - cflags: [ - "-Wall", - "-Werror", - ], -} - -cc_library_shared { - name: "android.hardware.sensors@1.0-impl.samsung8226", - defaults: ["hidl_defaults"], - proprietary: true, - relative_install_path: "hw", - srcs: ["Sensors.cpp"], - shared_libs: [ - "liblog", - "libcutils", - "libhardware", - "libbase", - "libutils", - "libhidlbase", - "libhidltransport", - "android.hardware.sensors@1.0", - ], - static_libs: [ - "android.hardware.sensors@1.0-convert", - "multihal-samsung8226", - ], - local_include_dirs: ["include/sensors"], -} - -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"], - srcs: ["service.cpp"], - - shared_libs: [ - "liblog", - "libcutils", - "libdl", - "libbase", - "libutils", - "libhidlbase", - "libhidltransport", - "libhwbinder", - "android.hardware.sensors@1.0", - ], - arch: { -cc_library_static { - name: "multihal-samsung8226", - vendor: true, - srcs: [ - "multihal.cpp", - "SensorEventQueue.cpp", - ], - header_libs: [ - "libhardware_headers", - ], - shared_libs: [ - "liblog", - "libcutils", - "libutils", - "libdl", - ], - export_include_dirs: ["."], - cflags: [ - "-Wall", - "-Werror", - ], -} - -cc_library_shared { - name: "android.hardware.sensors@1.0-impl.samsung8226", - defaults: ["hidl_defaults"], - proprietary: true, - relative_install_path: "hw", - srcs: ["Sensors.cpp"], - shared_libs: [ - "liblog", - "libcutils", - "libhardware", - "libbase", - "libutils", - "libhidlbase", - "libhidltransport", - "android.hardware.sensors@1.0", - ], - static_libs: [ - "android.hardware.sensors@1.0-convert", - "multihal-samsung8226", - ], - local_include_dirs: ["include/sensors"], } cc_binary { @@ -135,9 +41,4 @@ cc_binary { cflags: ["-DARCH_ARM_32"], }, }, -} - arm: { - cflags: ["-DARCH_ARM_32"], - }, - }, } diff --git a/sensors/android.hardware.sensors@1.0-service.samsung8226.rc b/sensors/android.hardware.sensors@1.0-service.samsung8226.rc index 40d89de..ee9a5a6 100644 --- a/sensors/android.hardware.sensors@1.0-service.samsung8226.rc +++ b/sensors/android.hardware.sensors@1.0-service.samsung8226.rc @@ -1,5 +1,6 @@ service sensors-hal-1-0 /vendor/bin/hw/android.hardware.sensors@1.0-service.samsung8226 class hal - user root + user system group system input wakelock - capabilities BLOCK_SUSPEND SYS_NICE + capabilities BLOCK_SUSPEND + rlimit rtprio 10 10 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.