Skip to content

Conversation

@szijpeter
Copy link

@szijpeter szijpeter commented Feb 12, 2026

📜 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) in SentryReplayOptions.

It's a low-risk, sensible default imo.

💡 Motivation and Context

💚 How did you test it?

Reproduction path:

  1. Use PreviewView in COMPATIBLE mode
  2. Keep screenshot strategy on the default path (PixelCopy), i.e. do not set Canvas.

👉🏼 https://github.com/szijpeter/sentry-java/tree/repro/4400

Why these two matter:

  • COMPATIBLE forces the TextureView path where camera pixels are composited into the normal view hierarchy and can show up in captures.
  • PERFORMANCE typically uses SurfaceView, which often gives black/non-captured camera content and can hide the bug (false negative). note that it might still fall back to TextureView in certain cases.
  • setting screenshot strategy to canvas is a different capture mode and masks broadly; it does not rely on the defaults
Repro Repro + Fix
repro repro+fix

Workarounds for older SDK versions

  • explicitly mask PreviewView in app code via addMaskViewClass
  • and/or set screenshot strategy to canvas

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

adding screenshot tests? could be worth it, but I feel like maybe out of scope for this PR

@szijpeter szijpeter force-pushed the fix/4400-add-preview-view-to-default-masked-view-classes branch from fcdd4cb to 7f0346e Compare February 12, 2026 22:41
@szijpeter szijpeter marked this pull request as ready for review February 12, 2026 22:58
@szijpeter szijpeter changed the title Add PreviewView to default masked view classes Session Replay: Add PreviewView to default masked view classes Feb 13, 2026
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.

Session Replay is unable to mask content when using the Camera

1 participant