diff options
author | lokilee73 <changjoo.lee@samsung.com> | 2019-04-24 18:56:03 +0900 |
---|---|---|
committer | lokilee73 <changjoo.lee@samsung.com> | 2019-04-24 19:25:22 +0900 |
commit | 42e274e13e70d96b2645939bca83a29c7e0226bb (patch) | |
tree | df9f7b721070d5ce29ebe749813bdf7936b3ff9f | |
parent | 76396809a8809e9d8155eed3605817f3bde104f0 (diff) | |
download | deviced-42e274e13e70d96b2645939bca83a29c7e0226bb.tar.gz deviced-42e274e13e70d96b2645939bca83a29c7e0226bb.tar.bz2 deviced-42e274e13e70d96b2645939bca83a29c7e0226bb.zip |
Remove power off related code in lowbat_popup
power off by low battery is executed without popup.
So, power off related code in lowbat_popup is useless.
Change-Id: Ia2443aa3ea8e2a3b964286c085234921cb1cd0b4
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
-rw-r--r-- | src/battery/battery.h | 1 | ||||
-rw-r--r-- | src/battery/lowbat-handler.c | 18 |
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()); |