Move Oppo props into phh-prop-handler.sh

This commit is contained in:
Michael Cheah 2020-03-26 22:41:24 +08:00
parent f7981ef123
commit 1db7e1e1fe
No known key found for this signature in database
GPG Key ID: 18BDAE324064CD9D
2 changed files with 30 additions and 3 deletions

View File

@ -58,3 +58,30 @@ if [ "$1" == "persist.sys.phh.xiaomi.dt2w" ]; then
fi
exit $?
fi
if [ "$1" == "persist.sys.phh.oppo.dt2w" ]; then
if [[ "$prop_value" -ne 0 && "$prop_value" -ne 1 ]]; then
exit 1
fi
echo "$prop_value" >/proc/touchpanel/double_tap_enable
exit
fi
if [ "$1" == "persist.sys.phh.oppo.gaming_mode" ]; then
if [[ "$prop_value" -ne 0 && "$prop_value" -ne 1 ]]; then
exit 1
fi
echo "$prop_value" >/proc/touchpanel/game_switch_enable
exit
fi
if [ "$1" == "persist.sys.phh.oppo.usbotg" ]; then
if [[ "$prop_value" -ne 0 && "$prop_value" -ne 1 ]]; then
exit 1
fi
echo "$prop_value" >/sys/class/power_supply/usb/otg_switch
exit
fi

View File

@ -18,13 +18,13 @@ on property:persist.sys.phh.mainkeys=*
setprop qemu.hw.mainkeys ${persist.sys.phh.mainkeys}
on property:persist.sys.phh.oppo.dt2w=*
exec_background u:r:phhsu_daemon:s0 root -- /system/bin/sh -c "echo ${persist.sys.phh.oppo.dt2w} > /proc/touchpanel/double_tap_enable"
exec_background u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.oppo.dt2w"
on property:persist.sys.phh.oppo.gaming_mode=*
exec_background u:r:phhsu_daemon:s0 root -- /system/bin/sh -c "echo ${persist.sys.phh.oppo.gaming_mode} > /proc/touchpanel/game_switch_enable"
exec_background u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.oppo.gaming_mode"
on property:persist.sys.phh.oppo.usbotg=*
exec_background u:r:phhsu_daemon:s0 root -- /system/bin/sh -c "echo ${persist.sys.phh.oppo.usbotg} > /sys/class/power_supply/usb/otg_switch"
exec_background u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.oppo.usbotg"
on property:persist.sys.phh.xiaomi.dt2w=*
exec_background u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.xiaomi.dt2w"