RUM-13567: Avoid querying battery during initialization#3099
Merged
Conversation
|
🎯 Code Coverage 🔗 Commit SHA: efb3204 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
jonathanmos
force-pushed
the
jmoskovich/rum-13567/fix-battery-anr
branch
2 times, most recently
from
January 6, 2026 08:18
438d110 to
c1c9312
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3099 +/- ##
===========================================
- Coverage 71.46% 71.40% -0.07%
===========================================
Files 880 880
Lines 32480 32479 -1
Branches 5473 5474 +1
===========================================
- Hits 23211 23189 -22
- Misses 7728 7739 +11
- Partials 1541 1551 +10
🚀 New features to boost your workflow:
|
jonathanmos
force-pushed
the
jmoskovich/rum-13567/fix-battery-anr
branch
from
January 6, 2026 10:41
c1c9312 to
f8fb549
Compare
jonathanmos
marked this pull request as ready for review
January 7, 2026 08:45
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8fb549ca7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ambushwork
previously approved these changes
Jan 7, 2026
jonathanmos
force-pushed
the
jmoskovich/rum-13567/fix-battery-anr
branch
from
January 7, 2026 09:16
f8fb549 to
efb3204
Compare
aleksandr-gringauz
approved these changes
Jan 7, 2026
ambushwork
approved these changes
Jan 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Instead of populating the initial battery level when the battery provider starts up, here we instead rely on lazy querying whenever getState is called.
Motivation
Move battery level querying entirely off the main thread.
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)