diff --git a/prebuilts/bin/vasott_script.sh b/prebuilts/bin/vasott_script.sh index 39eec27..2a6f65b 100755 --- a/prebuilts/bin/vasott_script.sh +++ b/prebuilts/bin/vasott_script.sh @@ -3,6 +3,8 @@ pverifier_disable="" stop_skbtv="" stop_upgrade="" +set_btv_notification="1" #Setting default turn on for every boot up +set_system_sound="0" #Setting default turn off for every boot up while [ true ]; do @@ -24,6 +26,40 @@ while [ true ]; do setprop vendor.vasott.stop_upgrade "" fi + if [[ -n "$set_btv_notification" ]]; then + if [ "x$set_btv_notification" = "x0" ]; then + echo -e "Turn off Btv notification" > /dev/console + set_btv_notification="disallow_listener" + cmd notification $set_btv_notification com.skb.tv/com.skb.google.tv.fullFragment.tvapp.notification.TvNotificationListenerService + elif [ "x$set_btv_notification" = "x1" ]; then + echo -e "Turn on Btv notification" > /dev/console + set_btv_notification="allow_listener" + cmd notification $set_btv_notification com.skb.tv/com.skb.google.tv.fullFragment.tvapp.notification.TvNotificationListenerService + else + echo -e "[vendor.vasott.set_btv_notification] unknown command:$set_btv_notification " > /dev/console + fi + setprop vendor.vasott.set_btv_notification "" + set_btv_notification="" + else + set_btv_notification=`getprop vendor.vasott.set_btv_notification` + fi + + if [[ -n "$set_system_sound" ]]; then + if [ "x$set_system_sound" = "x0" ]; then + echo -e "Turn off Syetem sounds" > /dev/console + settings put system sound_effects_enabled 0 + elif [ "x$set_system_sound" = "x1" ]; then + echo -e "Turn on Syetem sounds" > /dev/console + settings put system sound_effects_enabled 1 + else + echo -e "[vendor.vasott.set_system_sound] unknown command:$set_system_sound " > /dev/console + fi + setprop vendor.vasott.set_system_sound "" + set_system_sound="" + else + set_system_sound=`getprop vendor.vasott.set_system_sound` + fi + sleep 1 done diff --git a/sepolicy/vasott_script.te b/sepolicy/vasott_script.te index 84dcd8f..6b947a5 100644 --- a/sepolicy/vasott_script.te +++ b/sepolicy/vasott_script.te @@ -24,3 +24,4 @@ allow vasott_script shell_prop:property_service set; allow vasott_script toolbox_exec:file { execute execute_no_trans getattr open read }; allow vasott_script activity_service:service_manager find; +allow vasott_script notification_service:service_manager find;