mirror of
https://github.com/S3NEO/android_device_samsung_msm8226-common.git
synced 2024-11-06 21:55:45 +00:00
msm8226-common: sensors> use passtrough sensors multihal implementation for now (which perhaps make rotation and auto brightness work)
This commit is contained in:
parent
bfcc9d042c
commit
0453c8cb4f
4 changed files with 3 additions and 93 deletions
|
@ -16,29 +16,3 @@ cc_library_static {
|
||||||
],
|
],
|
||||||
export_include_dirs: ["."],
|
export_include_dirs: ["."],
|
||||||
}
|
}
|
||||||
|
|
||||||
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: {
|
|
||||||
arm: {
|
|
||||||
cflags: ["-DARCH_ARM_32"],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
|
@ -29,38 +29,17 @@ LOCAL_SRC_FILES := \
|
||||||
multihal.cpp \
|
multihal.cpp \
|
||||||
SensorEventQueue.cpp \
|
SensorEventQueue.cpp \
|
||||||
|
|
||||||
|
LOCAL_HEADER_LIBRARIES := \
|
||||||
|
libhardware_headers \
|
||||||
|
|
||||||
LOCAL_SHARED_LIBRARIES := \
|
LOCAL_SHARED_LIBRARIES := \
|
||||||
libcutils \
|
libcutils \
|
||||||
libdl \
|
libdl \
|
||||||
liblog \
|
liblog \
|
||||||
libutils \
|
libutils \
|
||||||
libhardware
|
|
||||||
|
|
||||||
LOCAL_STRIP_MODULE := false
|
LOCAL_STRIP_MODULE := false
|
||||||
LOCAL_VENDOR_MODULE := true
|
|
||||||
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
|
||||||
LOCAL_PROPRIETARY_MODULE := true
|
|
||||||
LOCAL_MODULE := android.hardware.sensors@1.0-service.s3ve3g
|
|
||||||
LOCAL_INIT_RC := android.hardware.sensors@1.0-service.s3ve3g.rc
|
|
||||||
LOCAL_SRC_FILES := \
|
|
||||||
service.cpp
|
|
||||||
|
|
||||||
LOCAL_SHARED_LIBRARIES := \
|
|
||||||
liblog \
|
|
||||||
libcutils \
|
|
||||||
libdl \
|
|
||||||
libbase \
|
|
||||||
libutils
|
|
||||||
|
|
||||||
LOCAL_SHARED_LIBRARIES += \
|
|
||||||
libhidlbase \
|
|
||||||
libhidltransport \
|
|
||||||
android.hardware.sensors@1.0
|
|
||||||
|
|
||||||
include $(BUILD_EXECUTABLE)
|
|
||||||
|
|
||||||
include $(call all-makefiles-under, $(LOCAL_PATH))
|
include $(call all-makefiles-under, $(LOCAL_PATH))
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
service sensors-hal-1-0 /vendor/bin/hw/android.hardware.sensors@1.0-service.samsung8226
|
|
||||||
class hal
|
|
||||||
user system
|
|
||||||
group system input wakelock
|
|
||||||
capabilities BLOCK_SUSPEND
|
|
||||||
rlimit rtprio 10 10
|
|
|
@ -1,37 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2016 The Android Open Source Project
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define LOG_TAG "android.hardware.sensors@1.0-service"
|
|
||||||
|
|
||||||
#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.
|
|
||||||
*/
|
|
||||||
return defaultPassthroughServiceImplementation<ISensors>(2);
|
|
||||||
}
|
|
Loading…
Reference in a new issue