[Bugfix][R305][bug-view-1524][battery] Low power shutdown processing
Change-Id: Ie89d673670f7286a49297a9b9395736c674e018e
diff --git a/lynq/R305/ap/app/zte_comm/zte_mmi/mmi_battery.c b/lynq/R305/ap/app/zte_comm/zte_mmi/mmi_battery.c
old mode 100644
new mode 100755
index dc6609b..2873aac
--- a/lynq/R305/ap/app/zte_comm/zte_mmi/mmi_battery.c
+++ b/lynq/R305/ap/app/zte_comm/zte_mmi/mmi_battery.c
@@ -140,6 +140,18 @@
s_mmi_poweroff_voltage_num ++ ;
if (s_mmi_poweroff_voltage_num >= 3) {
s_mmi_poweroff_voltage_num = 0;
+ fp = fopen("/sys/kernel/debug/charger_zx29/out_port_supply_in", "r");
+ memset(buff, 0, sizeof(buff));
+ if (fp != NULL)
+ {
+ fread(buff, 1, 16, fp);
+ fclose(fp);
+ if (atoi(buff) == 1)
+ {
+ slog(MMI_PRINT, SLOG_NORMAL, "/sys/kernel/debug/charger_zx29/out_port_supply_in enable flag %s, no need to shut down\n", buff);
+ return;
+ }
+ }
fp = fopen("/sys/class/power_supply/boost/boost_enabled", "r");
buff[0] = '\0';
if (fp != NULL && (ret=fread(buff, 1, 16, fp)) > 0 && buff[0] == '1')