diff options
author | lokilee73 <changjoo.lee@samsung.com> | 2017-01-20 00:03:34 +0900 |
---|---|---|
committer | Chang Joo Lee <changjoo.lee@samsung.com> | 2017-01-19 17:38:54 -0800 |
commit | 7a2ee8c44d78b4c78a046f5ce984012a84b15544 (patch) | |
tree | cf419f98a640413020980c45295206f8cb1e6bb0 | |
parent | 18e8cd1b0ce2ca6b91c6f7b1450488778943de26 (diff) | |
download | deviced-7a2ee8c44d78b4c78a046f5ce984012a84b15544.tar.gz deviced-7a2ee8c44d78b4c78a046f5ce984012a84b15544.tar.bz2 deviced-7a2ee8c44d78b4c78a046f5ce984012a84b15544.zip |
battery : fix a bug in active and event notisubmit/tizen_3.0/20170120.023435accepted/tizen/3.0/wearable/20170120.073304accepted/tizen/3.0/tv/20170120.073250accepted/tizen/3.0/mobile/20170120.073236accepted/tizen/3.0/ivi/20170120.073322accepted/tizen/3.0/common/20170120.102425
current battery value should be shown in active noti.
but, it was applied to event noti.
Change-Id: Iafb62c6a309870a23599a6b7d87d0c4766860f91
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
-rwxr-xr-x | src/battery/lowbat-handler.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/battery/lowbat-handler.c b/src/battery/lowbat-handler.c index 2a0032a9..f83bcced 100755 --- a/src/battery/lowbat-handler.c +++ b/src/battery/lowbat-handler.c @@ -373,15 +373,12 @@ direct_launch: } if (!power_source) { - snprintf(temp, sizeof(temp), "%d", cur_bat_capacity); - ret = add_notification(event_noti, "s", temp); - } else ret = add_notification(event_noti, NULL, NULL); - - if (ret < 0) - _E("Failed to launch active_noti : %d", ret); - else - event_noti_on = ret; + if (ret < 0) + _E("Failed to launch event_noti : %d", ret); + else + event_noti_on = ret; + } } if (active_noti) { @@ -391,7 +388,12 @@ direct_launch: _E("Failed to launch remove active_noti : %d", ret); } - ret = add_notification(active_noti, NULL, NULL); + if (!power_source) { + snprintf(temp, sizeof(temp), "%d", cur_bat_capacity); + ret = add_notification(active_noti, "s", temp); + } else + ret = add_notification(active_noti, NULL, NULL); + if (ret < 0) _E("Failed to launch active noti : %d", ret); else |