#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;
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);
}
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);
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,
/* 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);
#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;
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);
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);
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,
/* 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);