vermeer: Enable single_tap sensor and set permissions for touch sensors

Change-Id: I777ed71ecc5dc502182567bc7e1166605251af93
This commit is contained in:
Arian
2024-05-31 01:48:42 +02:00
committed by Lunark :3
parent 6253d19ab6
commit f2ab17bc80
6 changed files with 25 additions and 2 deletions

View File

@@ -30,3 +30,6 @@ TARGET_OTA_ASSERT_DEVICE := vermeer
# Properties # Properties
TARGET_ODM_PROP += $(DEVICE_PATH)/properties/odm.prop TARGET_ODM_PROP += $(DEVICE_PATH)/properties/odm.prop
TARGET_VENDOR_PROP += $(DEVICE_PATH)/properties/vendor.prop TARGET_VENDOR_PROP += $(DEVICE_PATH)/properties/vendor.prop
# Sepolicy
BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor

View File

@@ -10,6 +10,10 @@ $(call inherit-product, device/xiaomi/sm8550-common/common.mk)
# Inherit from the proprietary version # Inherit from the proprietary version
$(call inherit-product, vendor/xiaomi/vermeer/vermeer-vendor.mk) $(call inherit-product, vendor/xiaomi/vermeer/vermeer-vendor.mk)
# Init
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/init/init.vermeer.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.vermeer.rc \
# Overlay # Overlay
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
FrameworkResOverlayVermeer \ FrameworkResOverlayVermeer \

6
init/init.vermeer.rc Normal file
View File

@@ -0,0 +1,6 @@
on boot
chown system system /sys/class/touch/touch_dev/fod_longpress_gesture_enabled
chmod 0660 /sys/class/touch/touch_dev/fod_longpress_gesture_enabled
chown system system /sys/class/touch/touch_dev/gesture_single_tap_enabled
chmod 0660 /sys/class/touch/touch_dev/gesture_single_tap_enabled

View File

@@ -475,4 +475,7 @@
black in software (to avoid aliasing or emulate a cutout that is not physically existent). black in software (to avoid aliasing or emulate a cutout that is not physically existent).
--> -->
<bool name="config_fillMainBuiltInDisplayCutout">true</bool> <bool name="config_fillMainBuiltInDisplayCutout">true</bool>
<!-- Type of the tap sensor. Empty if tap is not supported. -->
<string name="config_dozeTapSensorType" translatable="false">org.lineageos.sensor.single_tap</string>
</resources> </resources>

View File

@@ -1,2 +1,5 @@
# Fingerprint # Fingerprint
persist.vendor.fingerprint.sensor_location=720|2882|124 persist.vendor.fingerprint.sensor_location=720|2882|124
# Sensors
ro.vendor.sensors.xiaomi.single_tap=true

4
sepolicy/vendor/genfs_contexts vendored Normal file
View File

@@ -0,0 +1,4 @@
# Sensors
genfscon sysfs /devices/virtual/touch/touch_dev/fod_longpress_gesture_enabled u:object_r:vendor_sysfs_sensors:s0
genfscon sysfs /devices/virtual/touch/touch_dev/gesture_single_tap_enabled u:object_r:vendor_sysfs_sensors:s0
genfscon sysfs /devices/virtual/touch/touch_dev/gesture_single_tap_state u:object_r:vendor_sysfs_sensors:s0