hiphi: Add haptics support

* Taken from motorola/hiphi/hiphi:12/S3SHS32.12-42-11-5/bf0951:user/release-keys

Signed-off-by: 7Soldier <reg.fm4@gmail.com>
This commit is contained in:
Pranav Talmale 2022-06-12 13:18:11 +05:30 committed by 7Soldier
parent 3894757def
commit 299ae7add4
11 changed files with 60 additions and 0 deletions

View file

@ -140,6 +140,8 @@ TW_HAS_EDL_MODE := true
TW_CUSTOM_CPU_TEMP_PATH := /sys/class/thermal/thermal_zone39/temp
TW_EXCLUDE_DEFAULT_USB_INIT := true
TARGET_USE_CUSTOM_LUN_FILE_PATH := /config/usb_gadget/g1/functions/mass_storage.0/lun.%d/file
TW_SUPPORT_INPUT_AIDL_HAPTICS := true
TW_SUPPORT_INPUT_AIDL_HAPTICS_FIX_OFF := true
# Debug flags
TWRP_INCLUDE_LOGCAT := true

View file

@ -75,6 +75,7 @@ PRODUCT_EXTRA_RECOVERY_KEYS += \
# Take a few libraries from sources
TARGET_RECOVERY_DEVICE_MODULES += \
android.hardware.vibrator-V2-ndk_platform.so \
android.hidl.allocator@1.0 \
android.hidl.memory@1.0 \
android.hidl.memory.token@1.0 \
@ -88,6 +89,7 @@ TARGET_RECOVERY_DEVICE_MODULES += \
libdisplayconfig.qti
RECOVERY_LIBRARY_SOURCE_FILES += \
$(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.vibrator-V2-ndk_platform.so \
$(TARGET_OUT_SHARED_LIBRARIES)/android.hidl.allocator@1.0.so \
$(TARGET_OUT_SHARED_LIBRARIES)/android.hidl.memory@1.0.so \
$(TARGET_OUT_SHARED_LIBRARIES)/android.hidl.memory.token@1.0.so \

View file

@ -0,0 +1,22 @@
on late-init
write /sys/class/leds/vibrator/trigger "transient"
on late-fs
chmod 0666 /dev/qcom_haptic
chown system system /dev/qcom_haptic
on boot
start qti.vibrator
on property:sys.boot_completed=1
setprop vendor.haptic.calibrate.done 1
service qti.vibrator /system/bin/vendor.qti.hardware.vibrator.service
class hal
user root
group root
disabled
setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin
setenv RICHTAP_DEVICE_PATH /dev/qcom_haptic
setenv ENV_RICHTAP_CONFIG_PATH /odm/etc/aac_richtap.config
seclabel u:r:recovery:s0

View file

@ -0,0 +1,34 @@
<!-- Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.vibrator</name>
<version>2</version>
<fqname>IVibrator/default</fqname>
</hal>
</manifest>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.