profiles/battery: Reset battery value cache on disconnect
authorSonny Sasaka <sonnysasaka@chromium.org>
Tue, 30 Mar 2021 18:38:35 +0000 (11:38 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:35 +0000 (19:08 +0530)
commit03cbaa04fd3760d3c536d52eed6f1725cafde599
treee246c082b15fa103654e0c6bc0b6a27f19e651b0
parentb1caf2e71df398d09452d88545b9fc0a5c196a58
profiles/battery: Reset battery value cache on disconnect

Due to cache in batt object, bluetoothd fails to update publish the
battery value after reconnection when the battery value does not change
compared to before reconnection. We should reset the battery percentage
cache on disconnect.

Reviewed-by: Alain Michaud <alainm@chromium.org>
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/battery/battery.c