fix(device): improve battery charging status detection and robustness#16450
fix(device): improve battery charging status detection and robustness#16450joshtrichards wants to merge 3 commits into
Conversation
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
|
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
|
test-Unit test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/16450-Unit-test-19-54 |
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/16450.apk |
|
Hi! Thanks for your contribution. This PR has been in draft for some time, so we'd like to check whether you're still planning to work on it. If the PR is still valid and you intend to continue, please mark it as Ready for Review (remove the draft status) and add the review label. We'll then be happy to take a look. If you no longer plan to continue with this PR, please let us know so we can keep the backlog up to date. Thanks! |

Mostly a refactor (code modernization and readability), but also:
The charge status logic prevents false positives for "charging," such as when the device is plugged in but not actually charging and also handles weird devices and status results as robustly as possible.