From 091321c413955c9d2015ec39871aae4da506548b Mon Sep 17 00:00:00 2001 From: zainarbani Date: Fri, 23 Sep 2022 22:48:12 +0700 Subject: [PATCH] Exclude FP input devices for rosemary rosemary uses 96 for fp custom keycode which detected by InputManager as KEY_KPENTER. screenshots key combo will fail if more than 2 key events detected, exclude it. Signed-off-by: zainarbani --- base.mk | 1 + files/rosemary-excluded-input-devices.xml | 31 +++++++++++++++++++++++ rw-system.sh | 3 +++ 3 files changed, 35 insertions(+) create mode 100644 files/rosemary-excluded-input-devices.xml diff --git a/base.mk b/base.mk index af27de5..d3a0a20 100644 --- a/base.mk +++ b/base.mk @@ -135,6 +135,7 @@ PRODUCT_COPY_FILES += \ device/phh/treble/files/bv9500plus-mtk-kpd.kl:system/phh/bv9500plus-mtk-kpd.kl \ device/phh/treble/files/moto-liber-gpio-keys.kl:system/phh/moto-liber-gpio-keys.kl \ device/phh/treble/files/tecno-touchpanel.kl:system/phh/tecno-touchpanel.kl \ + device/phh/treble/files/rosemary-excluded-input-devices.xml:system/phh/rosemary-excluded-input-devices.xml SELINUX_IGNORE_NEVERALLOWS := true diff --git a/files/rosemary-excluded-input-devices.xml b/files/rosemary-excluded-input-devices.xml new file mode 100644 index 0000000..bb484cf --- /dev/null +++ b/files/rosemary-excluded-input-devices.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rw-system.sh b/rw-system.sh index c789ce4..874ed50 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -589,6 +589,9 @@ if getprop ro.vendor.build.fingerprint | grep -iq -e Redmi/rosemary \ -e Redmi/secret -e Redmi/maltose; then setprop debug.sf.latch_unsignaled 1 setprop debug.sf.enable_hwc_vds 0 + + # Exclude FP input devices + mount -o bind /system/phh/rosemary-excluded-input-devices.xml /system/etc/excluded-input-devices.xml fi if getprop ro.vendor.build.fingerprint | grep -iq -E -e 'huawei|honor' || getprop persist.sys.overlay.huawei | grep -iq -E -e 'true'; then