Skip to content

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

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

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

Conversation

@joshtrichards

Copy link
Copy Markdown
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

github-actions Bot commented Feb 5, 2026

Copy link
Copy Markdown

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

github-actions Bot commented Feb 5, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Feb 5, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Feb 5, 2026

Copy link
Copy Markdown

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.

@alperozturk96

Copy link
Copy Markdown
Collaborator

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!

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.

2 participants