From 1987539ebc54801cfaf09238ced8c0a06803751d Mon Sep 17 00:00:00 2001 From: lokilee73 Date: Sun, 15 Jan 2017 16:16:46 +0900 Subject: [PATCH] battery : change low battery default notification from event to active Change-Id: I143968efa79f38798a0d1df6de9975c2bdb79216 Signed-off-by: lokilee73 --- src/battery/lowbat-handler.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/battery/lowbat-handler.c b/src/battery/lowbat-handler.c index 097c20c..1a108ae 100755 --- a/src/battery/lowbat-handler.c +++ b/src/battery/lowbat-handler.c @@ -357,37 +357,37 @@ direct_launch: if (lowbat_popup_option == LOWBAT_OPT_CHECK || lowbat_popup_option == LOWBAT_OPT_WARNING) { - if (active_noti) { - if (active_noti_on > 0) { - ret = remove_notification("BatteryLowCriticalNotiOff", active_noti_on); + if (event_noti) { + if (event_noti_on > 0) { + ret = remove_notification("BatteryLowCriticalNotiOff", event_noti_on); if (ret < 0) - _E("Failed to launch remove_active_noti : %d", ret); + _E("Failed to remove event_noti : %d", ret); } if (!power_source) { snprintf(temp, sizeof(temp), "%d", cur_bat_capacity); - ret = add_notification(active_noti, "s", temp); + ret = add_notification(event_noti, "s", temp); } else - ret = add_notification(active_noti, NULL, NULL); + ret = add_notification(event_noti, NULL, NULL); if (ret < 0) _E("Failed to launch active_noti : %d", ret); else - active_noti_on = ret; + event_noti_on = ret; } - if (event_noti) { - if (event_noti_on > 0) { - ret = remove_notification("BatteryLowCriticalNotiOff", event_noti_on); + if (active_noti) { + if (active_noti_on > 0) { + ret = remove_notification("BatteryLowCriticalNotiOff", active_noti_on); if (ret < 0) - _E("Failed to launch remove_event_noti : %d", ret); + _E("Failed to launch remove active_noti : %d", ret); } - ret = add_notification(event_noti, NULL, NULL); + ret = add_notification(active_noti, NULL, NULL); if (ret < 0) - _E("Failed to launch event noti : %d", ret); + _E("Failed to launch active noti : %d", ret); else - event_noti_on = ret; + active_noti_on = ret; return ret; } } else -- 2.7.4