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)