low battery popup : it is changed from popup to noti, so we don't need low battery... 28/101928/1
authorlokilee73 <changjoo.lee@samsung.com>
Fri, 2 Dec 2016 10:46:11 +0000 (19:46 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Fri, 2 Dec 2016 10:46:28 +0000 (19:46 +0900)
Change-Id: Idb59088c293abd5aea3cea2d43c93854f6b322b4
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
src/battery/battery-mobile.c
src/battery/battery-wearable.c

index ba1630f..2a0e620 100755 (executable)
@@ -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);
index 0897d1e..171fcc0 100755 (executable)
@@ -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);