health: Don't turn on charging control if not plugged in

Also cancel a possibly existing charging control notification.

Previously charging control was turned on when settings were changed and
on system start even if no charger was plugged in, thus possibly showing
the charging control notification.

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/8610
Change-Id: I78c47f026aa47ac756cc6eca12157ea58bda58fd
Signed-off-by: Jackeagle <jackeagle102@gmail.com>
1 file changed
tree: 077d6bcb3b91a1e03b69e4dfd93ffcec426cb673
  1. lib/
  2. LICENSES/
  3. lineage/
  4. packages/
  5. sdk/
  6. Android.bp
  7. REUSE.toml