Skip to content

Commit 5c59bf7

Browse files
committed
Formatting
1 parent f8f5698 commit 5c59bf7

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

sentry-android-replay/src/main/java/io/sentry/android/replay/ReplayIntegration.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class ReplayIntegration(
129129
return
130130
}
131131

132-
captureStrategy?.sendReplayForEvent(event, hint, onSegmentSent = { captureStrategy?.currentSegment?.getAndIncrement()})
132+
captureStrategy?.sendReplayForEvent(event, hint, onSegmentSent = { captureStrategy?.currentSegment?.getAndIncrement() })
133133
captureStrategy = captureStrategy?.convert()
134134
}
135135

sentry-android-replay/src/main/java/io/sentry/android/replay/capture/BaseCaptureStrategy.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import java.util.concurrent.atomic.AtomicInteger
2626
import java.util.concurrent.atomic.AtomicLong
2727
import java.util.concurrent.atomic.AtomicReference
2828

29-
abstract class BaseCaptureStrategy(
29+
internal abstract class BaseCaptureStrategy(
3030
private val options: SentryOptions,
3131
private val dateProvider: ICurrentDateProvider,
3232
protected var recorderConfig: ScreenshotRecorderConfig,
@@ -52,7 +52,7 @@ abstract class BaseCaptureStrategy(
5252
currentReplayId.set(replayId)
5353

5454
if (cleanupOldReplays) {
55-
replayExecutor.submitSafely(options, "${TAG}.replays_cleanup") {
55+
replayExecutor.submitSafely(options, "$TAG.replays_cleanup") {
5656
// clean up old replays
5757
options.cacheDirPath?.let { cacheDir ->
5858
File(cacheDir).listFiles { dir, name ->
@@ -99,7 +99,7 @@ abstract class BaseCaptureStrategy(
9999
segmentId: Int,
100100
height: Int,
101101
width: Int,
102-
replayType: ReplayType = SESSION,
102+
replayType: ReplayType = SESSION
103103
): ReplaySegment {
104104
val generatedVideo = cache?.createVideoOf(
105105
duration,
@@ -119,7 +119,7 @@ abstract class BaseCaptureStrategy(
119119
width,
120120
frameCount,
121121
videoDuration,
122-
replayType,
122+
replayType
123123
)
124124
}
125125

@@ -132,7 +132,7 @@ abstract class BaseCaptureStrategy(
132132
width: Int,
133133
frameCount: Int,
134134
duration: Long,
135-
replayType: ReplayType,
135+
replayType: ReplayType
136136
): ReplaySegment {
137137
val replay = SentryReplayEvent().apply {
138138
eventId = currentReplayId
@@ -194,7 +194,7 @@ abstract class BaseCaptureStrategy(
194194
val videoDuration: Long,
195195
val replay: SentryReplayEvent,
196196
val recording: ReplayRecording
197-
): ReplaySegment() {
197+
) : ReplaySegment() {
198198
fun capture(hub: IHub?, hint: Hint = Hint()) {
199199
hub?.captureReplay(replay, hint.apply { replayRecording = recording })
200200
}

sentry-android-replay/src/main/java/io/sentry/android/replay/capture/BufferCaptureStrategy.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ import io.sentry.util.FileUtils
1717
import java.io.File
1818
import java.security.SecureRandom
1919

20-
class BufferCaptureStrategy(
20+
internal class BufferCaptureStrategy(
2121
private val options: SentryOptions,
2222
private val hub: IHub?,
2323
private val dateProvider: ICurrentDateProvider,
2424
recorderConfig: ScreenshotRecorderConfig,
25-
private val random: SecureRandom,
25+
private val random: SecureRandom
2626
) : BaseCaptureStrategy(options, dateProvider, recorderConfig) {
2727

2828
private val bufferedSegments = mutableListOf<ReplaySegment.Created>()
@@ -33,7 +33,7 @@ class BufferCaptureStrategy(
3333

3434
override fun stop() {
3535
val replayCacheDir = cache?.replayCacheDir
36-
replayExecutor.submitSafely(options, "${TAG}.stop") {
36+
replayExecutor.submitSafely(options, "$TAG.stop") {
3737
FileUtils.deleteRecursively(replayCacheDir)
3838
}
3939
super.stop()
@@ -150,7 +150,7 @@ class BufferCaptureStrategy(
150150
val replayId = currentReplayId.get()
151151
val height = this.recorderConfig.recordingHeight
152152
val width = this.recorderConfig.recordingWidth
153-
replayExecutor.submitSafely(options, "${TAG}.onConfigurationChanged") {
153+
replayExecutor.submitSafely(options, "$TAG.onConfigurationChanged") {
154154
val segment =
155155
createSegment(duration, currentSegmentTimestamp, replayId, segmentId, height, width, BUFFER)
156156
if (segment is ReplaySegment.Created) {

sentry-android-replay/src/main/java/io/sentry/android/replay/capture/CaptureStrategy.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import io.sentry.protocol.SentryId
88
import java.util.concurrent.atomic.AtomicInteger
99
import java.util.concurrent.atomic.AtomicReference
1010

11-
interface CaptureStrategy {
11+
internal interface CaptureStrategy {
1212
val currentSegment: AtomicInteger
1313
val currentReplayId: AtomicReference<SentryId>
1414

sentry-android-replay/src/main/java/io/sentry/android/replay/capture/SessionCaptureStrategy.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import io.sentry.transport.ICurrentDateProvider
1515
import io.sentry.util.FileUtils
1616
import java.util.concurrent.ScheduledExecutorService
1717

18-
class SessionCaptureStrategy(
18+
internal class SessionCaptureStrategy(
1919
private val options: SentryOptions,
2020
private val hub: IHub?,
2121
private val dateProvider: ICurrentDateProvider,

sentry-android-replay/src/main/java/io/sentry/android/replay/util/Sampling.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package io.sentry.android.replay.util
22

33
import java.security.SecureRandom
44

5-
fun SecureRandom.sample(rate: Double?): Boolean {
5+
internal fun SecureRandom.sample(rate: Double?): Boolean {
66
if (rate != null) {
77
return !(rate < this.nextDouble()) // bad luck
88
}

0 commit comments

Comments
 (0)