Skip to content

Commit f57b850

Browse files
committed
Remove unused code
1 parent 4fedad4 commit f57b850

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

sentry-android-core/src/main/java/io/sentry/android/core/ManifestMetadataReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ static void applyMetadata(
484484
if ("canvas".equals(screenshotStrategyRaw)) {
485485
options.getSessionReplay().setScreenshotStrategy(ScreenshotStrategyType.CANVAS);
486486
} else {
487-
// always default to PIXEL_COPYq
487+
// always default to PIXEL_COPY
488488
options.getSessionReplay().setScreenshotStrategy(ScreenshotStrategyType.PIXEL_COPY);
489489
}
490490
}

sentry-android-replay/src/main/java/io/sentry/android/replay/screenshot/CanvasStrategy.kt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ import android.view.View
2929
import androidx.annotation.RequiresApi
3030
import io.sentry.SentryLevel
3131
import io.sentry.SentryOptions
32-
import io.sentry.SentryReplayOptions
33-
import io.sentry.SentryReplayOptions.IMAGE_VIEW_CLASS_NAME
34-
import io.sentry.SentryReplayOptions.TEXT_VIEW_CLASS_NAME
3532
import io.sentry.android.replay.ExecutorProvider
3633
import io.sentry.android.replay.ScreenshotRecorderCallback
3734
import io.sentry.android.replay.ScreenshotRecorderConfig
@@ -59,7 +56,7 @@ internal class CanvasStrategy(
5956
private val prescaledMatrix by
6057
lazy(NONE) { Matrix().apply { preScale(config.scaleFactorX, config.scaleFactorY) } }
6158
private val lastCaptureSuccessful = AtomicBoolean(false)
62-
private val textIgnoringCanvas = TextIgnoringDelegateCanvas(options.sessionReplay)
59+
private val textIgnoringCanvas = TextIgnoringDelegateCanvas()
6360

6461
private val isClosed = AtomicBoolean(false)
6562

@@ -214,7 +211,7 @@ internal class CanvasStrategy(
214211
}
215212

216213
@SuppressLint("UseKtx")
217-
private class TextIgnoringDelegateCanvas(sessionReplay: SentryReplayOptions) : Canvas() {
214+
private class TextIgnoringDelegateCanvas : Canvas() {
218215

219216
lateinit var delegate: Canvas
220217
private val solidPaint = Paint()
@@ -228,13 +225,6 @@ private class TextIgnoringDelegateCanvas(sessionReplay: SentryReplayOptions) : C
228225

229226
private val bitmapColorCache = WeakHashMap<Bitmap, Pair<Int, Int>>()
230227

231-
private val maskAllText =
232-
sessionReplay.maskViewClasses.contains(TEXT_VIEW_CLASS_NAME) ||
233-
sessionReplay.maskViewClasses.size > 1
234-
private val maskAllImages =
235-
sessionReplay.maskViewClasses.contains(IMAGE_VIEW_CLASS_NAME) ||
236-
sessionReplay.maskViewClasses.size > 1
237-
238228
override fun isHardwareAccelerated(): Boolean {
239229
return false
240230
}

0 commit comments

Comments
 (0)