Add persist.sys.phh.backlight.scale to control brightness scale from treble app
This commit is contained in:
parent
30071d0420
commit
843c0ec80a
@ -143,3 +143,20 @@ if [ "$1" == "persist.sys.phh.vsmart.dt2w" ];then
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" == "persist.sys.phh.backlight.scale" ];then
|
||||
if [[ "$prop_value" != "0" && "$prop_value" != "1" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$prop_value" == 1 ]];then
|
||||
if [ -f /sys/class/leds/lcd-backlight/max_brightness ];then
|
||||
setprop persist.sys.qcom-brightness "$(cat /sys/class/leds/lcd-backlight/max_brightness)"
|
||||
elif [ -f /sys/class/backlight/panel0-backlight/max_brightness ];then
|
||||
setprop persist.sys.qcom-brightness "$(cat /sys/class/backlight/panel0-backlight/max_brightness)"
|
||||
fi
|
||||
else
|
||||
setprop persist.sys.qcom-brightness -1
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
3
vndk.rc
3
vndk.rc
@ -44,6 +44,9 @@ on property:persist.sys.phh.caf.audio_policy=*
|
||||
on property:persist.sys.phh.vsmart.dt2w=*
|
||||
exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.vsmart.dt2w"
|
||||
|
||||
on property:persist.sys.phh.backlight.scale=*
|
||||
exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.backlight.scale"
|
||||
|
||||
on property:ro.sf.lcd_density=*
|
||||
restart surfaceflinger
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user