Merge pull request #158 from buddi56/android-10.0

Added CPH1859 and CPH1861 for DT2W and Brightness fixes
This commit is contained in:
Pierre-Hugues HUSSON 2020-03-01 17:31:25 +01:00 committed by GitHub
commit 96a1827f2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,7 +129,7 @@ changeKeylayout() {
changed=true
fi
if getprop ro.build.overlay.deviceid |grep -q -e RMX1931 -e CPH1859;then
if getprop ro.build.overlay.deviceid |grep -q -e RMX1931 -e CPH1859 -e CPH1861;then
cp /system/phh/oppo-touchpanel.kl /mnt/phh/keylayout/touchpanel.kl
chmod 0644 /mnt/phh/keylayout/touchpanel.kl
changed=true
@ -161,7 +161,7 @@ mount -o remount,ro / || true
for part in /dev/block/bootdevice/by-name/oppodycnvbk /dev/block/platform/bootdevice/by-name/nvdata;do
if [ -b "$part" ];then
for devname in RMX1931 CPH1859;do
for devname in RMX1931 CPH1859 CPH1861;do
if grep -q $devname $part;then
setprop ro.build.overlay.deviceid $devname
fi
@ -241,6 +241,10 @@ if getprop ro.vendor.product.device |grep -iq -e RMX1801 -e RMX1803 -e RMX1807;t
setprop persist.sys.qcom-brightness "$(cat /sys/class/leds/lcd-backlight/max_brightness)"
fi
if getprop ro.build.overlay.deviceid |grep -q -e CPH1859 -e CPH1861;then
setprop persist.sys.qcom-brightness "$(cat /sys/class/leds/lcd-backlight/max_brightness)"
fi
if getprop ro.vendor.build.fingerprint | grep -iq \
-e Xiaomi/beryllium/beryllium -e Xiaomi/sirius/sirius \
-e Xiaomi/dipper/dipper -e Xiaomi/ursa/ursa -e Xiaomi/polaris/polaris \