battery: Relocate remove_health_popup() from mobile plugin 30/307330/1
authorYunhee Seo <yuni.seo@samsung.com>
Thu, 7 Mar 2024 01:47:43 +0000 (10:47 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Thu, 7 Mar 2024 08:28:58 +0000 (17:28 +0900)
commitefb9952f5f32e037ea6d03dc3a0537101cb44c2d
tree35b4b4f96fb2dee4eee1399966dcfa34bbbb5d88
parentf4b7ef5db2513058fe4c18b55048f34f4bee2c84
battery: Relocate remove_health_popup() from mobile plugin

*In this description, "core" refers to the deviced module below src.

Move function remove_health_popup from mobile plugin to core battery module.

[Reason]
When the battery health status is abnormal, core battery module reuqests launching popup.
The location where it requests to add or remove pop-ups is different.
Actually, battery health management responsibility should be moved to core battery module.
Because overall battery health is manged in core battery moudle not mobile plugin.
Also, remove_health_popup() is used only power-supply in core battery module.

As explained above, it can be seen that shotgun surgery and feature envy code smells
from the remove_health_popup().

[How to]
Delete the function from the mobile plguin battery module and move it to
the deviced core battery module.

Change-Id: I6e968e53552e41db947218b95ad3b1c98b74cf90
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
plugins/mobile/battery/battery-notification.c
src/battery/battery-ops.h
src/battery/power-supply.c