static struct battery_status *battery;
static guint abnormal_timer;
-static int check_power_supply_noti(void)
-{
- return 1;
-}
-
static void health_timer_reset(void)
{
abnormal_timer = 0;
return;
_D("Add plugins for battery notification.");
- plugin->check_power_supply_noti = check_power_supply_noti;
ret = gdbus_signal_subscribe(NULL, DEVICED_PATH_SYSNOTI,
DEVICED_INTERFACE_SYSNOTI, SIGNAL_CHARGEERR_RESPONSE, abnormal_popup_dbus_signal_handler, NULL, NULL);
int ret = 0;
int noti = 0;
int retry;
+ bool is_possible_battery_full_noti;
if (battery_plgn->check_power_supply_noti)
noti = battery_plgn->check_power_supply_noti();
+ else if (syscommon_plugin_deviced_battery_is_possible_to_notify_battery_full(&is_possible_battery_full_noti) == 0)
+ noti = (int)is_possible_battery_full_noti;
if (!noti)
return ret;
static void noti_batt_full(void)
{
static int bat_full_noti;
+ bool is_possible_battery_full_noti;
if (!battery.charge_full && bat_full_noti == 1) {
power_supply_noti(DEVICE_NOTI_BATT_FULL, DEVICE_NOTI_OFF);
/* turn on LCD, if battery is fully charged */
if (battery_plgn->check_power_supply_noti && battery_plgn->check_power_supply_noti()) {
battery_pm_change_internal(DEVICED_EVENT_BATTERY_CAPACITY_FULL, LCD_NORMAL);
- } else
+ } else if (syscommon_plugin_deviced_battery_is_possible_to_notify_battery_full(&is_possible_battery_full_noti) == 0) {
+ if (is_possible_battery_full_noti) {
+ battery_pm_change_internal(DEVICED_EVENT_BATTERY_CAPACITY_FULL, LCD_NORMAL);
+ }
+ } else {
_I("Block LCD.");
+ }
/* on the full charge state */
syscommon_notifier_emit_notify(DEVICED_NOTIFIER_FULLBAT, (void *)&bat_full_noti);