Include realme rmx1931 detection, set specific kl for dt2w in that case

This commit is contained in:
Pierre-Hugues Husson 2020-02-21 16:35:07 +01:00
parent 22df6a9302
commit 62f63e975d
3 changed files with 19 additions and 1 deletions

View File

@ -109,7 +109,8 @@ PRODUCT_COPY_FILES += \
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/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
device/phh/treble/files/lenovo-synaptics_dsx.kl:system/phh/lenovo-synaptics_dsx.kl \
device/phh/treble/files/oppo-touchpanel.kl:system/phh/oppo-touchpanel.kl \
SELINUX_IGNORE_NEVERALLOWS := true

2
files/oppo-touchpanel.kl Normal file
View File

@ -0,0 +1,2 @@
key 62 WAKEUP

View File

@ -129,6 +129,12 @@ changeKeylayout() {
changed=true
fi
if getprop ro.build.overlay.deviceid |grep -q RMX1931;then
cp /system/phh/oppo-touchpanel.kl /mnt/phh/keylayout/touchpanel.kl
chmod 0644 /mnt/phh/keylayout/touchpanel.kl
changed=true
fi
if [ "$changed" = true ]; then
mount -o bind /mnt/phh/keylayout /system/usr/keylayout
restorecon -R /system/usr/keylayout
@ -147,6 +153,15 @@ fi
mount -o remount,ro /system || true
mount -o remount,ro / || true
if [ -b /dev/block/bootdevice/by-name/oppodycnvbk ];then
for devname in RMX1931;do
if grep -q $devname /dev/block/bootdevice/by-name/oppodycnvbk;then
setprop ro.build.overlay.deviceid $devname
fi
done
fi
mkdir -p /mnt/phh/
mount -t tmpfs -o rw,nodev,relatime,mode=755,gid=0 none /mnt/phh || true
mkdir /mnt/phh/empty_dir