static struct battery_status battery;
struct battery_status old_battery;
static int noti_id;
-static int online_status;
+static int online_status = -1;
static int abnormal_health_popup_timer;
static bool launching_health_popup;
}
if (battery.online > POWER_SUPPLY_TYPE_BATTERY &&
- online_status == VCONFKEY_SYSMAN_CHARGER_DISCONNECTED) {
+ online_status != VCONFKEY_SYSMAN_CHARGER_CONNECTED) {
online_status = VCONFKEY_SYSMAN_CHARGER_CONNECTED;
extcon_update_count(EXTCON_TA, 1);
check_power_supply(online_status);
charger_state_send_system_event(battery.charge_status);
broadcast = true;
} else if (battery.online <= POWER_SUPPLY_TYPE_BATTERY &&
- online_status == VCONFKEY_SYSMAN_CHARGER_CONNECTED) {
+ online_status != VCONFKEY_SYSMAN_CHARGER_DISCONNECTED) {
online_status = VCONFKEY_SYSMAN_CHARGER_DISCONNECTED;
check_power_supply(online_status);
if (old_battery.charge_status != battery.charge_status)