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 <zaintsyariev@gmail.com>
This commit is contained in:
zainarbani 2022-09-23 22:48:12 +07:00
parent 8bd41df06c
commit 091321c413
3 changed files with 35 additions and 0 deletions

View File

@ -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/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/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/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 SELINUX_IGNORE_NEVERALLOWS := true

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Copyright (c) 2018 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. -->
<devices>
<device name="uinput-fpc" />
<device name="uinput-goodix" />
</devices>

View File

@ -589,6 +589,9 @@ if getprop ro.vendor.build.fingerprint | grep -iq -e Redmi/rosemary \
-e Redmi/secret -e Redmi/maltose; then -e Redmi/secret -e Redmi/maltose; then
setprop debug.sf.latch_unsignaled 1 setprop debug.sf.latch_unsignaled 1
setprop debug.sf.enable_hwc_vds 0 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 fi
if getprop ro.vendor.build.fingerprint | grep -iq -E -e 'huawei|honor' || getprop persist.sys.overlay.huawei | grep -iq -E -e 'true'; then if getprop ro.vendor.build.fingerprint | grep -iq -E -e 'huawei|honor' || getprop persist.sys.overlay.huawei | grep -iq -E -e 'true'; then