Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit42f75b5

Browse files
authored
Merge pull request#1429 from square/tomm/remove-papa-safetrace-usages
Replace Papa SafeTrace with androidx.tracing
2 parentsb8c78b8 +d5cc268 commit42f75b5

File tree

3 files changed

+12
-21
lines changed

3 files changed

+12
-21
lines changed

‎workflow-tracing-papa/build.gradle.kts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ android {
1111

1212
dependencies {
1313
api(libs.androidx.collection)
14+
api(libs.androidx.tracing.ktx)
1415
api(libs.kotlin.jdk8)
1516
api(libs.kotlinx.coroutines.core)
16-
api(libs.squareup.papa)
1717

1818
api(project(":workflow-core"))
1919
api(project(":workflow-runtime"))

‎workflow-tracing-papa/dependencies/releaseRuntimeClasspath.txt‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
1-
androidx.annotation:annotation-experimental:1.1.0
21
androidx.annotation:annotation-jvm:1.9.1
32
androidx.annotation:annotation:1.9.1
4-
androidx.arch.core:core-common:2.0.0
53
androidx.collection:collection-jvm:1.5.0
64
androidx.collection:collection:1.5.0
7-
androidx.core:core:1.6.0
8-
androidx.lifecycle:lifecycle-common:2.0.0
9-
androidx.lifecycle:lifecycle-runtime:2.0.0
10-
androidx.tracing:tracing-ktx:1.1.0
11-
androidx.tracing:tracing:1.1.0
12-
androidx.versionedparcelable:versionedparcelable:1.1.1
13-
com.squareup.curtains:curtains:1.2.5
5+
androidx.tracing:tracing-ktx:1.2.0
6+
androidx.tracing:tracing:1.2.0
147
com.squareup.okio:okio-jvm:3.3.0
158
com.squareup.okio:okio:3.3.0
16-
com.squareup.papa:papa-main-trace:0.30
17-
com.squareup.papa:papa-safetrace:0.30
18-
com.squareup.papa:papa:0.30
199
org.jetbrains.kotlin:kotlin-bom:2.1.21
2010
org.jetbrains.kotlin:kotlin-stdlib-common:2.1.21
2111
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.1.21
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
packagecom.squareup.workflow1.tracing.papa
22

3+
importandroidx.tracing.Trace
4+
importandroidx.tracing.trace
35
importcom.squareup.workflow1.tracing.SafeTraceInterface
4-
importpapa.SafeTrace
56

67
/**
7-
* Production implementation of [SafeTraceInterface] thatdelegates to the actual [SafeTrace].
8+
* Production implementation of [SafeTraceInterface] thatuses androidx.tracing.Trace.
89
*
910
* @param isTraceable Whether tracing is enabled. Clients should configure this directly.
1011
* Defaults to false for backwards compatibility.
@@ -14,31 +15,31 @@ class PapaSafeTrace(
1415
) : SafeTraceInterface {
1516

1617
overrideval isCurrentlyTracing:Boolean
17-
get()=SafeTrace.isCurrentlyTracing
18+
get()=Trace.isEnabled()
1819

1920
overridefunbeginSection(label:String) {
20-
SafeTrace.beginSection(label)
21+
Trace.beginSection(label)
2122
}
2223

2324
overridefunendSection() {
24-
SafeTrace.endSection()
25+
Trace.endSection()
2526
}
2627

2728
overridefunbeginAsyncSection(
2829
name:String,
2930
cookie:Int
3031
) {
31-
SafeTrace.beginAsyncSection(name, cookie)
32+
Trace.beginAsyncSection(name, cookie)
3233
}
3334

3435
overridefunendAsyncSection(
3536
name:String,
3637
cookie:Int
3738
) {
38-
SafeTrace.endAsyncSection(name, cookie)
39+
Trace.endAsyncSection(name, cookie)
3940
}
4041

4142
overridefunlogSection(info:String) {
42-
SafeTrace.logSection(info)
43+
trace(info) {}
4344
}
4445
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp