Fix mixed FPC and Goodix sensors in Xiaomi Devices

This commit is contained in:
Asureus 2018-10-07 18:14:58 +08:00 committed by Pierre-Hugues HUSSON
parent 0874fd8bc3
commit a1f4707dec
1 changed files with 2 additions and 6 deletions

View File

@ -57,6 +57,8 @@ changeKeylayout() {
if getprop ro.vendor.build.fingerprint |grep -iq -e xiaomi/polaris -e xiaomi/sirius -e xiaomi/dipper -e xiaomi/wayne -e xiaomi/jasmine;then
cp /system/phh/empty /mnt/phh/keylayout/uinput-goodix.kl
chmod 0644 /mnt/phh/keylayout/uinput-goodix.kl
cp /system/phh/empty /mnt/phh/keylayout/uinput-fpc.kl
chmod 0644 /mnt/phh/keylayout/uinput-fpc.kl
changed=true
fi
@ -66,12 +68,6 @@ changeKeylayout() {
changed=true
fi
if getprop ro.vendor.build.fingerprint | grep -iq -e xiaomi/wayne -e xiaomi/jasmine;then
cp /system/phh/empty /mnt/phh/keylayout/uinput-fpc.kl
chmod 0644 /mnt/phh/keylayout/uinput-fpc.kl
changed=true
fi
if [ "$changed" == true ];then
mount -o bind /mnt/phh/keylayout /system/usr/keylayout
restorecon -R /system/usr/keylayout