From 73a9334e3523c74393376b3c7164f8d56fe636ab Mon Sep 17 00:00:00 2001 From: lokilee73 Date: Fri, 2 Dec 2016 19:46:11 +0900 Subject: [PATCH] low battery popup : it is changed from popup to noti, so we don't need low battery popup Change-Id: Idb59088c293abd5aea3cea2d43c93854f6b322b4 Signed-off-by: lokilee73 --- src/battery/battery-mobile.c | 32 -------------------------------- src/battery/battery-wearable.c | 32 -------------------------------- 2 files changed, 64 deletions(-) diff --git a/src/battery/battery-mobile.c b/src/battery/battery-mobile.c index ba1630f..2a0e620 100755 --- a/src/battery/battery-mobile.c +++ b/src/battery/battery-mobile.c @@ -29,8 +29,6 @@ #define POWER_METHOD "reboot" #define POWER_OPERATION_OFF "poweroff" -static const struct popup_ops lowbattery_warning_ops; -static const struct popup_ops lowbattery_critical_ops; static const struct popup_ops lowbattery_poweroff_ops; static const struct popup_ops charge_error_low_ops; static const struct popup_ops charge_error_high_ops; @@ -43,12 +41,6 @@ static int remove_other_charge_popups(bundle *b, const struct popup_ops *ops); static void remove_other_lowbattery_popups(const struct popup_ops *ops) { _D("remove_other_lowbattery_popups() is finished"); - if (ops != &lowbattery_warning_ops) - unload_simple_popup(&lowbattery_warning_ops); - - if (ops != &lowbattery_critical_ops) - unload_simple_popup(&lowbattery_critical_ops); - if (ops != &lowbattery_poweroff_ops) unload_simple_popup(&lowbattery_poweroff_ops); } @@ -208,8 +200,6 @@ static void charge_error_ok_clicked(const struct popup_ops *ops) static int remove_battery_popups(bundle *b, const struct popup_ops *ops) { _I("Remove battery related popups"); - unload_simple_popup(&lowbattery_critical_ops); - unload_simple_popup(&lowbattery_warning_ops); unload_simple_popup(&lowbattery_poweroff_ops); unload_simple_popup(&charge_error_low_ops); unload_simple_popup(&charge_error_high_ops); @@ -219,26 +209,6 @@ static int remove_battery_popups(bundle *b, const struct popup_ops *ops) return 0; } -static const struct popup_ops lowbattery_warning_ops = { - .name = "lowbattery_warning", - .pattern = FEEDBACK_PATTERN_LOWBATT, - .show = load_simple_popup, - .content = "IDS_COM_POP_BATTERYLOW", - .left_text = "IDS_COM_SK_OK", - .pre = lowbattery_launch, - .terminate = lowbattery_terminate, -}; - -static const struct popup_ops lowbattery_critical_ops = { - .name = "lowbattery_critical", - .pattern = FEEDBACK_PATTERN_LOWBATT, - .show = load_simple_popup, - .content = "IDS_COM_POP_BATTERYLOW", - .left_text = "IDS_COM_SK_OK", - .pre = lowbattery_launch, - .terminate = lowbattery_terminate, -}; - static const struct popup_ops lowbattery_poweroff_ops = { .name = "lowbattery_poweroff", .pattern = FEEDBACK_PATTERN_LOWBATT, @@ -286,8 +256,6 @@ static const struct popup_ops battery_disconnected_ops = { /* Constructor to register lowbattery button */ static __attribute__ ((constructor)) void battery_register_popup(void) { - register_popup(&lowbattery_warning_ops); - register_popup(&lowbattery_critical_ops); register_popup(&lowbattery_poweroff_ops); register_popup(&charge_error_low_ops); register_popup(&charge_error_high_ops); diff --git a/src/battery/battery-wearable.c b/src/battery/battery-wearable.c index 0897d1e..171fcc0 100755 --- a/src/battery/battery-wearable.c +++ b/src/battery/battery-wearable.c @@ -23,8 +23,6 @@ #define DEVICED_INTERFACE_SYSNOTI "org.tizen.system.deviced.SysNoti" #define SIGNAL_CHARGEERR_RESPONSE "ChargeErrResponse" -static const struct popup_ops lowbattery_warning_ops; -static const struct popup_ops lowbattery_critical_ops; static const struct popup_ops lowbattery_poweroff_ops; static const struct popup_ops charge_error_low_ops; static const struct popup_ops charge_error_high_ops; @@ -34,12 +32,6 @@ static int lowbattery_launch(bundle *b, const struct popup_ops *ops); static int remove_other_lowbattery_popups(const struct popup_ops *ops) { - if (ops != &lowbattery_warning_ops) - unload_simple_popup(&lowbattery_warning_ops); - - if (ops != &lowbattery_critical_ops) - unload_simple_popup(&lowbattery_critical_ops); - if (ops != &lowbattery_poweroff_ops) unload_simple_popup(&lowbattery_poweroff_ops); @@ -168,8 +160,6 @@ static void charge_error_ok_clicked(const struct popup_ops *ops) static int remove_battery_popups(bundle *b, const struct popup_ops *ops) { _I("Remove battery related popups"); - unload_simple_popup(&lowbattery_critical_ops); - unload_simple_popup(&lowbattery_warning_ops); unload_simple_popup(&lowbattery_poweroff_ops); unload_simple_popup(&charge_error_low_ops); unload_simple_popup(&charge_error_high_ops); @@ -178,26 +168,6 @@ static int remove_battery_popups(bundle *b, const struct popup_ops *ops) return 0; } -static const struct popup_ops lowbattery_warning_ops = { - .name = "lowbattery_warning", - .pattern = FEEDBACK_PATTERN_LOWBATT, - .show = load_simple_popup, - .content = "IDS_COM_POP_BATTERYLOW", - .left_text = "IDS_COM_SK_OK", - .pre = lowbattery_launch, - .terminate = lowbattery_terminate, -}; - -static const struct popup_ops lowbattery_critical_ops = { - .name = "lowbattery_critical", - .pattern = FEEDBACK_PATTERN_LOWBATT, - .show = load_simple_popup, - .content = "IDS_COM_POP_BATTERYLOW", - .left_text = "IDS_COM_SK_OK", - .pre = lowbattery_launch, - .terminate = lowbattery_terminate, -}; - static const struct popup_ops lowbattery_poweroff_ops = { .name = "lowbattery_poweroff", .pattern = FEEDBACK_PATTERN_LOWBATT, @@ -245,8 +215,6 @@ static const struct popup_ops battery_disconnected_ops = { /* Constructor to register lowbattery button */ static __attribute__ ((constructor)) void battery_register_popup(void) { - register_popup(&lowbattery_warning_ops); - register_popup(&lowbattery_critical_ops); register_popup(&lowbattery_poweroff_ops); register_popup(&charge_error_low_ops); register_popup(&charge_error_high_ops); -- 2.7.4