Add support for Lenovo Z5 dt2w

This commit is contained in:
Pierre-Hugues Husson 2019-11-01 18:30:18 +01:00
parent 09f46d0192
commit dcb6f64f42
3 changed files with 9 additions and 1 deletions

View File

@ -107,7 +107,8 @@ PRODUCT_COPY_FILES += \
device/phh/treble/files/samsung-sec_e-pen.idc:system/usr/idc/sec_e-pen.idc \ device/phh/treble/files/samsung-sec_e-pen.idc:system/usr/idc/sec_e-pen.idc \
device/phh/treble/files/samsung-9810-floating_feature.xml:system/ph/sam-9810-flo_feat.xml \ device/phh/treble/files/samsung-9810-floating_feature.xml:system/ph/sam-9810-flo_feat.xml \
device/phh/treble/files/mimix3-gpio-keys.kl:system/phh/mimix3-gpio-keys.kl \ device/phh/treble/files/mimix3-gpio-keys.kl:system/phh/mimix3-gpio-keys.kl \
device/phh/treble/files/nokia-soc_gpio_keys.kl:system/phh/nokia-soc_gpio_keys.kl device/phh/treble/files/nokia-soc_gpio_keys.kl:system/phh/nokia-soc_gpio_keys.kl \
device/phh/treble/files/lenovo-synaptics_dsx.kl:system/phh/lenovo-synaptics_dsx.kl
SELINUX_IGNORE_NEVERALLOWS := true SELINUX_IGNORE_NEVERALLOWS := true

View File

@ -0,0 +1 @@
key 542 WAKEUP

View File

@ -118,6 +118,12 @@ changeKeylayout() {
changed=true changed=true
fi fi
if getprop ro.vendor.build.fingerprint |grep -iq -E -e '^Lenovo/kunlun';then
cp /system/phh/lenovo-synaptics_dsx.kl /mnt/phh/keylayout/synaptics_dsx.kl
chmod 0644 /mnt/phh/keylayout/synaptics_dsx.kl
changed=true
fi
if [ "$changed" = true ]; then if [ "$changed" = true ]; then
mount -o bind /mnt/phh/keylayout /system/usr/keylayout mount -o bind /mnt/phh/keylayout /system/usr/keylayout
restorecon -R /system/usr/keylayout restorecon -R /system/usr/keylayout