TWRP: Enable qti input haptics vibrators support
* these type of vibrators are present in newer devices based on
board sm8150 & above. Like Oneplus 7 series, Redmi K20 Pro, etc.
* to enable it add TW_SUPPORT_INPUT_1_2_HAPTICS := true in Boardconfig.mk
* you will need to add the vendor vibrator service to init and run it in your device tree
Change-Id: I0fe6612def149e70808ca41829b6f7ba0b23cd62
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
(cherry picked from commit 909daa959c99cf3a6abbe224ec3fc45669df4440)
diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk
index 99f9a23..2b5650d 100644
--- a/minuitwrp/Android.mk
+++ b/minuitwrp/Android.mk
@@ -10,6 +10,13 @@
graphics_utils.cpp \
events.cpp
+ifeq ($(TW_SUPPORT_INPUT_1_2_HAPTICS),true)
+ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0)
+ LOCAL_SHARED_LIBRARIES += android.hardware.vibrator@1.2 libhidlbase
+ LOCAL_CFLAGS += -DUSE_QTI_HAPTICS
+ endif
+endif
+
ifneq ($(TW_BOARD_CUSTOM_GRAPHICS),)
$(warning ****************************************************************************)
$(warning * TW_BOARD_CUSTOM_GRAPHICS support has been deprecated in TWRP. *)