Simplify matching for lenovo dt2w

This commit is contained in:
Pierre-Hugues Husson 2019-11-04 22:56:22 +01:00 committed by tboy1991
parent 551e1b0397
commit 6a1bccc72b
2 changed files with 5 additions and 1 deletions

View File

@ -118,7 +118,7 @@ changeKeylayout() {
changed=true changed=true
fi fi
if getprop ro.vendor.build.fingerprint |grep -iq -E -e '^Lenovo/kunlun';then if getprop ro.vendor.build.fingerprint |grep -iq -E -e '^Lenovo/' && [ -f /sys/devices/virtual/touch/tp_dev/gesture_on ];then
cp /system/phh/lenovo-synaptics_dsx.kl /mnt/phh/keylayout/synaptics_dsx.kl cp /system/phh/lenovo-synaptics_dsx.kl /mnt/phh/keylayout/synaptics_dsx.kl
chmod 0644 /mnt/phh/keylayout/synaptics_dsx.kl chmod 0644 /mnt/phh/keylayout/synaptics_dsx.kl
changed=true changed=true

4
sepolicy/lenovo.te Normal file
View File

@ -0,0 +1,4 @@
type sysfs_tp, file_type;
#Allow treble_app access to /sys/devices/virtual/touch/tp_dev/gesture_on
allow system_app sysfs_tp:file rw_file_perms;