Skip to content

v4.16.1

Latest

Choose a tag to compare

@github-actions github-actions released this 22 Sep 06:32
  • Bug fix: keep_on_charge no longer waits for unplug when the battery is already full - real device report: "aunque la bateria este al 100% cargada a veces parece que esta el dispositivo al 50%". keep_on_charge's gate in handle_event() only checked whether a power source was connected (AC/USB/Wireless powered: true from dumpsys battery) - a flag Android keeps true for as long as the cable stays plugged in, well past the point the battery actually finishes charging (status becomes "Full", but the power-source flag never changes). So keep_on_charge genuinely meant "until unplugged", never "until charged": a phone left on the charger overnight, picked up already at 100%, stayed throttled (capped CPU/cores, killed/reniced apps, WiFi off, etc. - whatever the active event applies) for no real reason until physically unplugged. Now also requires DETECT_BATTERY_LEVEL < 100 to hold the restrictions, mirroring the exact "battery topped off" idiom (level -eq 100) PowerSentinel-chargehealth.sh already used elsewhere - restrictions now lift the moment the battery reaches 100%, cable still connected or not.
  • New persisted test (test_keep_on_charge_full_battery.sh, 4 cases: mid-charge holds as before, full-while-plugged-in now lifts, unplugged was already unaffected, and an unset/not-yet-refreshed battery-level reading fails toward NOT getting stuck) - confirmed to actually catch the original bug by reverting the fix and observing the exact failure before restoring it. 114 bash tests across 20 files and 33 frontend tests now pass.