mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-27 21:47:50 -04:00
* fix(battery): report when no charge threshold exists instead of faking success * fix(battery): hide the charge limit controls when there is no battery Follow-up to the review on #3385: the new explanation showed on desktops and VMs with no battery at all, where it reads as a fault report about hardware the machine was never going to have. Both the explanation and the apply button now require BatteryService.batteryAvailable. Hiding the button there is the same point the pull request makes elsewhere: offering a control that cannot work is what produced the false success in the first place. A machine without a battery has no charge threshold to write to, so the limit was never applicable. BatteryService.batteryAvailable is already the gate used twice in this file for the same reason.