summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/battery/battery.h1
-rw-r--r--src/battery/lowbat-handler.c18
2 files changed, 0 insertions, 19 deletions
diff --git a/src/battery/battery.h b/src/battery/battery.h
index 0b0f7b8a..5c38207e 100644
--- a/src/battery/battery.h
+++ b/src/battery/battery.h
@@ -26,7 +26,6 @@
#define BATTERY_LEVEL_CHECK_CRITICAL 1
#define LOWBAT_OPT_WARNING 1
-#define LOWBAT_OPT_POWEROFF 2
#define LOWBAT_OPT_CHARGEERR 3
#define LOWBAT_OPT_CHECK 4
diff --git a/src/battery/lowbat-handler.c b/src/battery/lowbat-handler.c
index 1d8cfa17..9f37f397 100644
--- a/src/battery/lowbat-handler.c
+++ b/src/battery/lowbat-handler.c
@@ -55,7 +55,6 @@
#define WARNING_LOW_BAT_ACT "warning_low_bat_act"
#define CRITICAL_LOW_BAT_ACT "critical_low_bat_act"
-#define POWER_OFF_BAT_ACT "power_off_bat_act"
#define CHARGE_BAT_ACT "charge_bat_act"
#define CHARGE_CHECK_ACT "charge_check_act"
#define CHARGE_ERROR_ACT "charge_error_act"
@@ -300,7 +299,6 @@ out:
int lowbat_popup(char *option)
{
- static int launched_poweroff;
static int lowbat_popup_option;
int ret;
int power_source = 1;
@@ -316,18 +314,12 @@ int lowbat_popup(char *option)
goto direct_launch;
}
- if (strcmp(option, POWER_OFF_BAT_ACT))
- launched_poweroff = 0;
-
if (!strcmp(option, WARNING_LOW_BAT_ACT)) {
power_source = get_lowbat_noti_value(LOW_BATTERY, &active_noti, &event_noti);
lowbat_popup_option = LOWBAT_OPT_CHECK;
} else if (!strcmp(option, CRITICAL_LOW_BAT_ACT)) {
power_source = get_lowbat_noti_value(CRITICAL_BATTERY, &active_noti, &event_noti);
lowbat_popup_option = LOWBAT_OPT_WARNING;
- } else if (!strcmp(option, POWER_OFF_BAT_ACT)) {
- value = "poweroff";
- lowbat_popup_option = LOWBAT_OPT_POWEROFF;
} else if (!strcmp(option, CHARGE_ERROR_ACT)) {
value = "chargeerr";
lowbat_popup_option = LOWBAT_OPT_CHARGEERR;
@@ -346,21 +338,11 @@ int lowbat_popup(char *option)
direct_launch:
_D("Popup value=%s", value);
if (booting_done(NULL)) {
-
- if (launched_poweroff == 1) {
- _I("Will be foreced power off.");
- power_execute(POWER_POWEROFF);
- return 0;
- }
-
if (battery.charge_now) {
_I("Skip low battery popup during charging.");
return 0;
}
- if (lowbat_popup_option == LOWBAT_OPT_POWEROFF)
- launched_poweroff = 1;
-
r_disturb = vconf_get_int("memory/shealth/sleep/do_not_disturb", &s_disturb);
if (r_disturb < 0)
_E("Failed to get vconf value for do not disturb: %d", vconf_get_ext_errno());