Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes

- Session Replay: Change bitmap config to `ARGB_8888` for screenshots ([#4282](https://github.com/getsentry/sentry-java/pull/4282))

## 7.22.4

### Fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ internal class ScreenshotRecorder(
Bitmap.createBitmap(
1,
1,
Bitmap.Config.RGB_565
Bitmap.Config.ARGB_8888
)
}
private val screenshot = Bitmap.createBitmap(
config.recordingWidth,
config.recordingHeight,
Bitmap.Config.RGB_565
Bitmap.Config.ARGB_8888
)
private val singlePixelBitmapCanvas: Canvas by lazy(NONE) { Canvas(singlePixelBitmap) }
private val prescaledMatrix by lazy(NONE) {
Expand Down Expand Up @@ -217,7 +217,9 @@ internal class ScreenshotRecorder(
fun close() {
unbind(rootView?.get())
rootView?.clear()
screenshot.recycle()
if (!screenshot.isRecycled) {
screenshot.recycle()
}
isCapturing.set(false)
}

Expand Down
Loading