diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh index 1382212..35faf34 100644 --- a/phh-prop-handler.sh +++ b/phh-prop-handler.sh @@ -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 diff --git a/vndk.rc b/vndk.rc index 6c02976..cbd22fa 100644 --- a/vndk.rc +++ b/vndk.rc @@ -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" \ No newline at end of file