From 62afccbe31f8e40aec0aaf6c6b455be89f1dda5a Mon Sep 17 00:00:00 2001 From: John Zhao Date: Fri, 9 Jun 2017 17:41:43 +0800 Subject: [PATCH] common: start the hbtp only when the ro.bootmode is not the charger In power off mode, the hbtp should not be started. Wrapping it for all corresponding targets. CRs-Fixed: 1060985 Change-Id: I95603370946ad677185be5338f8448bfe788ea35 --- rootdir/etc/init.qcom.post_boot.sh | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/rootdir/etc/init.qcom.post_boot.sh b/rootdir/etc/init.qcom.post_boot.sh index 04dc254a..90ead952 100644 --- a/rootdir/etc/init.qcom.post_boot.sh +++ b/rootdir/etc/init.qcom.post_boot.sh @@ -135,6 +135,15 @@ else fi } +function start_hbtp() +{ + # Start the Host based Touch processing but not in the power off mode. + bootmode=`getprop ro.bootmode` + if [ "charger" != $bootmode ]; then + start hbtp + fi +} + case "$target" in "msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_6x" | "msm7627a" | "msm7627_surf" | \ "qsd8250_surf" | "qsd8250_ffa" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "qsd8650a_st1x") @@ -472,14 +481,14 @@ case "$target" in "Surf") case "$platform_subtype_id" in "1") - start hbtp + start_hbtp ;; esac ;; "MTP") case "$platform_subtype_id" in "3") - start hbtp + start_hbtp ;; esac ;; @@ -1130,7 +1139,7 @@ case "$target" in #1200p panel is connected to the device. dir="/sys/bus/i2c/devices/3-0038" if [ ! -d "$dir" ]; then - start hbtp + start_hbtp fi ;; esac @@ -1342,7 +1351,7 @@ case "$target" in # Start Host based Touch processing case "$hw_platform" in "MTP" | "Surf" | "RCM" ) - start hbtp + start_hbtp ;; esac # Apply Scheduler and Governor settings for 8917 / 8920 @@ -1455,7 +1464,7 @@ case "$target" in # Start Host based Touch processing case "$hw_platform" in "MTP" | "Surf" | "RCM" ) - start hbtp + start_hbtp ;; esac @@ -1765,7 +1774,7 @@ case "$target" in # Start Host based Touch processing case "$hw_platform" in "MTP" | "Surf" | "RCM" | "QRD" ) - start hbtp + start_hbtp ;; esac ;; @@ -1777,7 +1786,7 @@ case "$target" in # Start Host based Touch processing case "$hw_platform" in "MTP" | "Surf" | "RCM" | "QRD" ) - start hbtp + start_hbtp ;; esac @@ -2344,7 +2353,7 @@ case "$target" in case "$soc_id" in "321") #sdm845 - start hbtp + start_hbtp ;; esac # Core control parameters @@ -2538,11 +2547,11 @@ case "$target" in "QRD") case "$platform_subtype_id" in "0") - start hbtp + start_hbtp ;; "16") if [ $platform_major_version -lt 6 ]; then - start hbtp + start_hbtp fi ;; esac