RUMS-5893: Fix NPE when SeekBar thumb is null#3419
Merged
Conversation
|
Bits Dev status: ✅ Done Comment @DataDog to request changes |
Contributor
|
I can only run on private repositories. |
0xnm
previously approved these changes
May 5, 2026
kikoveiga
previously approved these changes
May 5, 2026
Co-authored-by: nguyexua <lan.nguyen@datadoghq.com>
31d4eb2 to
1b9e534
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3419 +/- ##
===========================================
- Coverage 72.18% 72.06% -0.12%
===========================================
Files 961 961
Lines 35407 35408 +1
Branches 5880 5881 +1
===========================================
- Hits 25557 25514 -43
- Misses 8258 8282 +24
- Partials 1592 1612 +20
🚀 New features to boost your workflow:
|
0xnm
approved these changes
May 13, 2026
kikoveiga
approved these changes
May 13, 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?
Workflow Automation • View in Workflow Automation
Fixes a crash in Session Replay seek bar mapping when
SeekBar.thumbis null by safely skipping thumb wireframe creation. Adds a unit test to verify we still return track wireframes when the thumb is missing.Motivation
Some
SeekBarinstances can have a null thumb drawable. The existing mapper unconditionally accessedview.thumb.bounds, which could throw aNullPointerExceptionduring recording.Changes
SeekBarWireframeMapper.buildThumbWireframe()to return early whenview.thumbis null.SeekBarWireframeMapperTestcoverage for the{null thumb, Android O+}case, asserting mapping returns only active/non-active track wireframes.Testing
ktlint --format --reporter=jsonon changed Kotlin files via the lint tool (no issues)../gradlew :features:dd-sdk-android-session-replay:testDebugUnitTest --tests "*SeekBarWireframeMapperTest"but execution is blocked in this sandbox because Gradle wrapper download failed withjava.net.NoRouteToHostException.Additional Notes
This change is intentionally scoped to the Session Replay module and does not alter privacy behavior or public APIs.
Review checklist (to be filled by reviewers)
PR by Bits - View session in Datadog
Comment @DataDog to request changes