Skip to content

Commit 10c415f

Browse files
committed
Format code
1 parent 83b1f1a commit 10c415f

File tree

4 files changed

+34
-12
lines changed

4 files changed

+34
-12
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,9 @@ private static void setupProfiler(
348348
() -> options.getExecutorService(),
349349
() ->
350350
new PerfettoProfiler(
351-
context.getApplicationContext(), frameMetricsCollector, options.getLogger()))
351+
context.getApplicationContext(),
352+
frameMetricsCollector,
353+
options.getLogger()))
352354
: AndroidContinuousProfiler.createLegacy(
353355
buildInfoProvider,
354356
frameMetricsCollector,

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@
4141
* profiling backends independent. All ProfilingManager API usage is confined to this file and
4242
* {@link PerfettoProfiler}.
4343
*
44-
* <p>Currently, this class doesn't do app-start profiling {@link SentryPerformanceProvider}.
45-
* It is created during {@code Sentry.init()}.
44+
* <p>Currently, this class doesn't do app-start profiling {@link SentryPerformanceProvider}. It is
45+
* created during {@code Sentry.init()}.
4646
*
4747
* <p>Thread safety: all mutable state is guarded by a single {@link
4848
* io.sentry.util.AutoClosableReentrantLock}. Public entry points ({@link #startProfiler}, {@link
49-
* #stopProfiler}, {@link #close}, {@link #onRateLimitChanged}, {@link #reevaluateSampling}, and
50-
* the getters) acquire the lock themselves and are thread-safe.
51-
* Private methods {@code startInternal} and {@code stopInternal} require the caller to hold the lock.
49+
* #stopProfiler}, {@link #close}, {@link #onRateLimitChanged}, {@link #reevaluateSampling}, and the
50+
* getters) acquire the lock themselves and are thread-safe. Private methods {@code startInternal}
51+
* and {@code stopInternal} require the caller to hold the lock.
5252
*/
5353
@ApiStatus.Internal
5454
@RequiresApi(api = Build.VERSION_CODES.VANILLA_ICE_CREAM)

sentry-android-core/src/test/java/io/sentry/android/core/PerfettoContinuousProfilerTest.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ class PerfettoContinuousProfilerTest {
131131
// shouldStop must have been reset to false by startProfiler, so the profiler
132132
// should restart for the next chunk.
133133
fixture.executor.runAll()
134-
assertTrue(profiler.isRunning, "Profiler should continue running after chunk restart — shouldStop must be reset on start")
134+
assertTrue(
135+
profiler.isRunning,
136+
"Profiler should continue running after chunk restart — shouldStop must be reset on start",
137+
)
135138
}
136139
}

sentry/src/main/java/io/sentry/SentryEnvelopeItemHeader.java

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ public int getLength() {
5353
return platform;
5454
}
5555

56-
@Nullable Integer getMetaLength() {
56+
@Nullable
57+
Integer getMetaLength() {
5758
if (calculateMetaLength != null) {
5859
try {
5960
return calculateMetaLength.call();
@@ -97,7 +98,14 @@ private SentryEnvelopeItemHeader(
9798
final @Nullable Integer itemCount,
9899
final @Nullable Integer metaLength) {
99100
this(
100-
type, length, null, contentType, fileName, attachmentType, platform, itemCount,
101+
type,
102+
length,
103+
null,
104+
contentType,
105+
fileName,
106+
attachmentType,
107+
platform,
108+
itemCount,
101109
metaLength != null ? () -> metaLength : null);
102110
}
103111

@@ -114,8 +122,8 @@ public SentryEnvelopeItemHeader(
114122
}
115123

116124
/**
117-
* Lazy constructor. Both length and metaLength are computed lazily as these depend on
118-
* the Item having been evaluated.
125+
* Lazy constructor. Both length and metaLength are computed lazily as these depend on the Item
126+
* having been evaluated.
119127
*/
120128
SentryEnvelopeItemHeader(
121129
final @NotNull SentryItemType type,
@@ -126,7 +134,16 @@ public SentryEnvelopeItemHeader(
126134
final @Nullable String platform,
127135
final @Nullable Integer itemCount,
128136
final @Nullable Callable<Integer> calculateMetaLength) {
129-
this(type, -1, getLength, contentType, fileName, attachmentType, platform, itemCount, calculateMetaLength);
137+
this(
138+
type,
139+
-1,
140+
getLength,
141+
contentType,
142+
fileName,
143+
attachmentType,
144+
platform,
145+
itemCount,
146+
calculateMetaLength);
130147
}
131148

132149
SentryEnvelopeItemHeader(

0 commit comments

Comments
 (0)