Detect qcom extended brightness and set a property based on this, to be used by framework

This commit is contained in:
Pierre-Hugues Husson 2018-06-10 22:54:14 +02:00
parent c09149f86b
commit 19ce2265e5
1 changed files with 5 additions and 0 deletions

View File

@ -61,3 +61,8 @@ fi
if ! grep android.hardware.ir /vendor/manifest.xml;then
mount -o bind system/phh/empty /system/etc/permissions/android.hardware.consumerir.xml
fi
if getprop ro.hardware |grep -qF qcom && [ -f /sys/class/backlight/panel0-backlight/max_brightness ] && \
grep -qvE '^255$' /sys/class/backlight/panel0-backlight/max_brightness;then
setprop persist.sys.qcom-brightness $(cat /sys/class/backlight/panel0-backlight/max_brightness)
fi