- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
35 lines
1.0 KiB
Java
35 lines
1.0 KiB
Java
package androidx.work;
|
|
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.internal.InlineMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class TracerKt {
|
|
public static final <T> T traced(Tracer tracer, String label, Function0 block) {
|
|
Intrinsics.checkNotNullParameter(tracer, "<this>");
|
|
Intrinsics.checkNotNullParameter(label, "label");
|
|
Intrinsics.checkNotNullParameter(block, "block");
|
|
boolean isEnabled = tracer.isEnabled();
|
|
if (isEnabled) {
|
|
try {
|
|
tracer.beginSection(label);
|
|
} catch (Throwable th) {
|
|
InlineMarker.finallyStart(1);
|
|
if (isEnabled) {
|
|
tracer.endSection();
|
|
}
|
|
InlineMarker.finallyEnd(1);
|
|
throw th;
|
|
}
|
|
}
|
|
T t = (T) block.invoke();
|
|
InlineMarker.finallyStart(1);
|
|
if (isEnabled) {
|
|
tracer.endSection();
|
|
}
|
|
InlineMarker.finallyEnd(1);
|
|
return t;
|
|
}
|
|
}
|