Session Replay: Add PreviewView to default masked view classes #5097
+8
−1
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.
📜 Description
PreviewView is the view used to display the camera feed for CameraX's Preview use case. Adding it to Replay option defaults aligns with existing sensitive defaults (
TextView,ImageView,WebView,VideoView, player views) inSentryReplayOptions.It's a low-risk, sensible default imo.
💡 Motivation and Context
💚 How did you test it?
Reproduction path:
PreviewViewin COMPATIBLE mode👉🏼 https://github.com/szijpeter/sentry-java/tree/repro/4400
Why these two matter:
COMPATIBLEforces theTextureViewpath where camera pixels are composited into the normal view hierarchy and can show up in captures.PERFORMANCEtypically usesSurfaceView, which often gives black/non-captured camera content and can hide the bug (false negative). note that it might still fall back toTextureViewin certain cases.canvasis a different capture mode and masks broadly; it does not rely on the defaultsWorkarounds for older SDK versions
PreviewViewin app code viaaddMaskViewClasscanvas📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
adding screenshot tests? could be worth it, but I feel like maybe out of scope for this PR