Skip to content

fix(device): improve battery charging status detection and robustness#16450

Draft
joshtrichards wants to merge 3 commits intomasterfrom
jtr/refactor-device-pms
Draft

fix(device): improve battery charging status detection and robustness#16450
joshtrichards wants to merge 3 commits intomasterfrom
jtr/refactor-device-pms

Conversation

@joshtrichards
Copy link
Member

Mostly a refactor (code modernization and readability), but also:

  • improved charge status logic (uses both EXTRA_STATUS and EXTRA_PLUGGED)
  • adds logging for diagnostics
  • doc/comment improvements

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.

  • Tests written, or not not needed

Signed-off-by: Josh <josh.t.richards@gmail.com>
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Codacy

SpotBugs

CategoryBaseNew
Bad practice4242
Correctness7474
Dodgy code257257
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness3434
Performance4343
Security1818
Total478478

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/16450.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant