From be40ae3083a9e5fbdf3acf4d4b8f70918a4a2c21 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Fri, 20 Nov 2020 19:03:02 +0100 Subject: [PATCH] sm8250-common: Import and build QTI vibrator HAL * The one in vendor requires some special OnePlus FWK bits. Change-Id: I5d3be54b2aa3ab35d5a6f88b831ea6abbe8279c7 --- common.mk | 4 ++++ sepolicy/private/file_contexts | 1 + vibrator/Android.mk | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 vibrator/Android.mk diff --git a/common.mk b/common.mk index ea85c11..36909b3 100644 --- a/common.mk +++ b/common.mk @@ -223,6 +223,10 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES_DEBUG += \ update_engine_client +# Vibrator +PRODUCT_PACKAGES += \ + vendor.qti.hardware.vibrator.service.oneplus_kona + # WiFi PRODUCT_PACKAGES += \ WifiResCommon diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts index f0ff596..fa57ec3 100644 --- a/sepolicy/private/file_contexts +++ b/sepolicy/private/file_contexts @@ -10,6 +10,7 @@ # HALs /(product|system/product)/vendor_overlay/[0-9]+/bin/hw/android\.hardware\.power-service u:object_r:hal_power_default_exec:s0 +/(product|system/product)/vendor_overlay/[0-9]+/bin/hw/vendor\.qti\.hardware\.vibrator\.service u:object_r:hal_vibrator_default_exec:s0 /system/bin/hw/lineage\.biometrics\.fingerprint\.inscreen@1.0-service\.oneplus_kona u:object_r:hal_fod_kona_exec:s0 /system/bin/hw/lineage\.livedisplay@2\.0-service\.oneplus_kona u:object_r:hal_livedisplay_kona_exec:s0 /system/bin/hw/lineage\.powershare@1\.0-service\.oneplus_kona u:object_r:hal_powershare_kona_exec:s0 diff --git a/vibrator/Android.mk b/vibrator/Android.mk new file mode 100644 index 0000000..db97ea5 --- /dev/null +++ b/vibrator/Android.mk @@ -0,0 +1,32 @@ +LOCAL_PATH := vendor/qcom/opensource/vibrator + +include $(CLEAR_VARS) + +LOCAL_MODULE := vendor.qti.hardware.vibrator.service.oneplus_kona +LOCAL_MODULE_TAGS := optional + +LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/bin +LOCAL_MODULE_RELATIVE_PATH := hw +LOCAL_MODULE_STEM := vendor.qti.hardware.vibrator.service + +LOCAL_CFLAGS += \ + -Wall \ + -Werror + +LOCAL_C_INCLUDES := \ + $(LOCAL_PATH)/aidl/include + +LOCAL_SRC_FILES := \ + aidl/service.cpp \ + aidl/Vibrator.cpp \ + effect/effect.cpp + +LOCAL_SHARED_LIBRARIES := \ + android.hardware.vibrator-ndk_platform \ + libbase \ + libbinder_ndk \ + libcutils \ + liblog \ + libutils + +include $(BUILD_EXECUTABLE)