From 740000e7866bd1f828ea20aea6a2fdfa4f106918 Mon Sep 17 00:00:00 2001 From: Michael Cheah Date: Thu, 26 Mar 2020 23:30:57 +0800 Subject: [PATCH] Fix value comparison in phh-prop-handler.sh --- phh-prop-handler.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh index 35faf34..0e15a1b 100644 --- a/phh-prop-handler.sh +++ b/phh-prop-handler.sh @@ -48,7 +48,7 @@ xiaomi_toggle_dt2w_event_node() { } if [ "$1" == "persist.sys.phh.xiaomi.dt2w" ]; then - if [[ "$prop_value" -ne 0 && "$prop_value" -ne 1 ]]; then + if [[ "$prop_value" != "0" && "$prop_value" != "1" ]]; then exit 1 fi @@ -60,7 +60,7 @@ if [ "$1" == "persist.sys.phh.xiaomi.dt2w" ]; then fi if [ "$1" == "persist.sys.phh.oppo.dt2w" ]; then - if [[ "$prop_value" -ne 0 && "$prop_value" -ne 1 ]]; then + if [[ "$prop_value" != "0" && "$prop_value" != "1" ]]; then exit 1 fi @@ -69,7 +69,7 @@ if [ "$1" == "persist.sys.phh.oppo.dt2w" ]; then fi if [ "$1" == "persist.sys.phh.oppo.gaming_mode" ]; then - if [[ "$prop_value" -ne 0 && "$prop_value" -ne 1 ]]; then + if [[ "$prop_value" != "0" && "$prop_value" != "1" ]]; then exit 1 fi @@ -78,7 +78,7 @@ if [ "$1" == "persist.sys.phh.oppo.gaming_mode" ]; then fi if [ "$1" == "persist.sys.phh.oppo.usbotg" ]; then - if [[ "$prop_value" -ne 0 && "$prop_value" -ne 1 ]]; then + if [[ "$prop_value" != "0" && "$prop_value" != "1" ]]; then exit 1 fi