diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh index a6c9765..8b65a68 100644 --- a/phh-prop-handler.sh +++ b/phh-prop-handler.sh @@ -184,3 +184,19 @@ if [ "$1" == "persist.sys.phh.backlight.scale" ];then fi exit fi + +if [ "$1" == "persist.sys.phh.disable_soundvolume_effect" ];then + if [[ "$prop_value" != "0" && "$prop_value" != "1" ]]; then + exit 1 + fi + + if [[ "$prop_value" == 1 ]];then + mount /system/phh/empty /vendor/lib/soundfx/libvolumelistener.so + mount /system/phh/empty /vendor/lib64/soundfx/libvolumelistener.so + else + umount /vendor/lib/soundfx/libvolumelistener.so + umount /vendor/lib64/soundfx/libvolumelistener.so + fi + restartAudio + exit +fi diff --git a/vndk.rc b/vndk.rc index 4adfe9e..d7cc703 100644 --- a/vndk.rc +++ b/vndk.rc @@ -47,6 +47,9 @@ on property: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:persist.sys.phh.disable_soundvolume_effect=* + exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.disable_soundvolume_effect" + on property:ro.sf.lcd_density=* restart surfaceflinger