Skip to content

Commit 6340bc5

Browse files
committed
Next API iteration based on using it in Square unit tests
1 parent 6e42b46 commit 6340bc5

File tree

44 files changed

+983
-368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+983
-368
lines changed

leakcanary/leakcanary-android-instrumentation/api/leakcanary-android-instrumentation.api

-8
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,3 @@ public final class leakcanary/SkipLeakDetection$Companion {
8888
public final fun shouldSkipTest (Lorg/junit/runner/Description;Ljava/lang/String;)Z
8989
}
9090

91-
public final class leakcanary/TestDescriptionHolder : org/junit/rules/TestRule {
92-
public static final field INSTANCE Lleakcanary/TestDescriptionHolder;
93-
public fun apply (Lorg/junit/runners/model/Statement;Lorg/junit/runner/Description;)Lorg/junit/runners/model/Statement;
94-
public final fun getTestDescription ()Lorg/junit/runner/Description;
95-
public final fun isEvaluating ()Z
96-
public final fun wrap (Lorg/junit/runners/model/Statement;Lorg/junit/runner/Description;)Lorg/junit/runners/model/Statement;
97-
}
98-

leakcanary/leakcanary-android-instrumentation/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ plugins {
66

77
dependencies {
88
api projects.leakcanary.leakcanaryAndroidCore
9+
api projects.leakcanary.leakcanaryAndroidTest
10+
api projects.leakcanary.leakcanaryTestCore
911
api projects.shark.sharkAndroid
1012

1113
implementation libs.androidX.test.runner

leakcanary/leakcanary-android-instrumentation/src/main/java/leakcanary/AndroidDetectLeaksAssert.kt

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package leakcanary
22

33
import android.os.SystemClock
4-
import androidx.test.platform.app.InstrumentationRegistry
5-
import java.io.File
64
import kotlin.time.Duration.Companion.milliseconds
75
import leakcanary.HeapAnalysisDecision.NoHeapAnalysis
86
import leakcanary.internal.InstrumentationHeapAnalyzer
@@ -61,12 +59,15 @@ class AndroidDetectLeaksAssert(
6159
}
6260
}
6361

64-
val heapDumpFileProvider = HeapDumpFileProvider.datetimeFormatted(
65-
directory = File(
66-
InstrumentationRegistry.getInstrumentation().targetContext.filesDir,
67-
"instrumentation_tests"
62+
val heapDumpFileProvider = DatetimeFormattedHeapDumpFileProvider(
63+
heapDumpDirectoryProvider = TargetContextHeapDumpDirectoryProvider(
64+
heapDumpDirectoryName = "instrumentation_tests"
6865
),
69-
prefix = "instrumentation_tests"
66+
suffixProvider = {
67+
TestNameProvider.currentTestName()?.run {
68+
"_${classSimpleName}-${methodName}"
69+
} ?: "_instrumentation-tests"
70+
}
7071
)
7172

7273
val heapDumpFile = heapDumpFileProvider.newHeapDumpFile()
@@ -104,6 +105,7 @@ class AndroidDetectLeaksAssert(
104105
TOTAL_DURATION to totalDurationMillis.toString()
105106
),
106107
)
108+
107109
is HeapAnalysisFailure -> it.copy(dumpDurationMillis = heapDumpDurationMillis)
108110
}
109111
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
public final class leakcanary/RepeatingAndroidInProcessScenarioKt {
2-
public static final fun repeatingAndroidInProcessScenario (Lshark/ObjectGrowthDetector;II)Lshark/RepeatingScenarioObjectGrowthDetector;
3-
public static synthetic fun repeatingAndroidInProcessScenario$default (Lshark/ObjectGrowthDetector;IIILjava/lang/Object;)Lshark/RepeatingScenarioObjectGrowthDetector;
2+
public static final fun repeatingAndroidInProcessScenario (Lshark/HeapDiff$Companion;Lshark/ObjectGrowthDetector;Lleakcanary/HeapDumpDirectoryProvider;Lleakcanary/HeapDumper;Lleakcanary/HeapDumpDeletionStrategy;)Lshark/RepeatingScenarioObjectGrowthDetector;
3+
public static synthetic fun repeatingAndroidInProcessScenario$default (Lshark/HeapDiff$Companion;Lshark/ObjectGrowthDetector;Lleakcanary/HeapDumpDirectoryProvider;Lleakcanary/HeapDumper;Lleakcanary/HeapDumpDeletionStrategy;ILjava/lang/Object;)Lshark/RepeatingScenarioObjectGrowthDetector;
4+
}
5+
6+
public final class leakcanary/TargetContextHeapDumpDirectoryProvider : leakcanary/HeapDumpDirectoryProvider {
7+
public fun <init> (Ljava/lang/String;)V
8+
public fun heapDumpDirectory ()Ljava/io/File;
49
}
510

leakcanary/leakcanary-android-test/build.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ plugins {
77
dependencies {
88
api projects.leakcanary.leakcanaryCore
99
api projects.leakcanary.leakcanaryAndroidUtils
10+
api projects.leakcanary.leakcanaryTestCore
1011
api projects.shark.sharkAndroid
1112

13+
implementation libs.androidX.test.runner
14+
1215
androidTestImplementation libs.androidX.multidex
1316
androidTestImplementation libs.androidX.test.core
1417
androidTestImplementation libs.androidX.test.runner

leakcanary/leakcanary-android-test/src/androidTest/java/leakcanary/RepeatingAndroidInProcessScenarioTest.kt

+5-8
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@ package leakcanary
22

33
import org.assertj.core.api.Assertions.assertThat
44
import org.junit.Test
5-
import shark.ObjectGrowthDetector
5+
import shark.HeapDiff
66
import shark.RepeatingScenarioObjectGrowthDetector.Companion.DEFAULT_MAX_HEAP_DUMPS
77
import shark.RepeatingScenarioObjectGrowthDetector.Companion.IN_PROCESS_SCENARIO_LOOPS_PER_DUMP
8-
import shark.forAndroidHeap
98

109
class RepeatingAndroidInProcessScenarioTest {
1110

1211
private val growingList = mutableListOf<String>()
1312

1413
@Test fun failing_scenario_iterates_to_max_heap_dumps_times_loops_per_dump() {
15-
val detector = ObjectGrowthDetector.forAndroidHeap()
16-
.repeatingAndroidInProcessScenario()
14+
val detector = HeapDiff.repeatingAndroidInProcessScenario()
1715
var iteration = 0
1816
detector.findRepeatedlyGrowingObjects {
1917
growingList += "growth $iteration"
@@ -24,15 +22,14 @@ class RepeatingAndroidInProcessScenarioTest {
2422
}
2523

2624
@Test fun failing_scenario_finds_expected_growing_object() {
27-
val detector = ObjectGrowthDetector.forAndroidHeap()
28-
.repeatingAndroidInProcessScenario()
25+
val detector = HeapDiff.repeatingAndroidInProcessScenario()
2926
var iteration = 0
30-
val heapGrowth = detector.findRepeatedlyGrowingObjects {
27+
val heapDiff = detector.findRepeatedlyGrowingObjects {
3128
growingList += "growth $iteration"
3229
iteration++
3330
}
3431

35-
val growingObject = heapGrowth.growingObjects.single()
32+
val growingObject = heapDiff.growingObjects.single()
3633
assertThat(growingObject.name).startsWith("INSTANCE_FIELD RepeatingAndroidInProcessScenarioTest.growingList")
3734
}
3835
}
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
package leakcanary
22

3-
import shark.HeapGraphProvider
3+
import shark.HeapDiff
44
import shark.ObjectGrowthDetector
55
import shark.RepeatingScenarioObjectGrowthDetector
6-
import shark.repeatingScenario
6+
import shark.forAndroidHeap
77

88
/**
99
* Creates a [RepeatingScenarioObjectGrowthDetector] suitable for Android in process tests, such
10-
* as Espresso tests. Typically called on a [ObjectGrowthDetector] created via
11-
* [shark.forAndroidHeap].
10+
* as Espresso tests.
1211
*
1312
* Dumps the heap by leveraging Android APIs, running an in process GC right before dumping.
14-
* Deletes the heap dump file as soon as we're done traversing it.
1513
*
1614
* @see [RepeatingScenarioObjectGrowthDetector.findRepeatedlyGrowingObjects]
1715
*/
18-
fun ObjectGrowthDetector.repeatingAndroidInProcessScenario(
19-
maxHeapDumps: Int = RepeatingScenarioObjectGrowthDetector.DEFAULT_MAX_HEAP_DUMPS,
20-
scenarioLoopsPerDump: Int = RepeatingScenarioObjectGrowthDetector.IN_PROCESS_SCENARIO_LOOPS_PER_DUMP,
16+
fun HeapDiff.Companion.repeatingAndroidInProcessScenario(
17+
objectGrowthDetector: ObjectGrowthDetector = ObjectGrowthDetector.forAndroidHeap(),
18+
heapDumpDirectoryProvider: HeapDumpDirectoryProvider = TargetContextHeapDumpDirectoryProvider(
19+
heapDumpDirectoryName = "heap_dumps_object_growth"
20+
),
21+
heapDumper: HeapDumper = HeapDumper.forAndroidInProcess()
22+
.withGc(gcTrigger = GcTrigger.inProcess())
23+
.withDetectorWarmup(objectGrowthDetector, androidHeap = true),
24+
heapDumpDeletionStrategy: HeapDumpDeletionStrategy = HeapDumpDeletionStrategy.DeleteOnHeapDumpClose(),
2125
): RepeatingScenarioObjectGrowthDetector {
22-
return repeatingScenario(
23-
heapGraphProvider = HeapGraphProvider.dumpingAndDeleting(
24-
heapDumper = HeapDumper.forAndroidInProcess()
25-
.withGc(gcTrigger = GcTrigger.inProcess())
26-
.withDetectorWarmup(this, androidHeap = true),
27-
heapDumpFileProvider = HeapDumpFileProvider.tempFile()
28-
),
29-
maxHeapDumps = maxHeapDumps,
30-
scenarioLoopsPerDump = scenarioLoopsPerDump,
26+
return repeatingDumpingTestScenario(
27+
objectGrowthDetector = objectGrowthDetector,
28+
heapDumpDirectoryProvider = heapDumpDirectoryProvider,
29+
heapDumper = heapDumper,
30+
heapDumpDeletionStrategy = heapDumpDeletionStrategy,
3131
)
3232
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package leakcanary
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import java.io.File
5+
6+
class TargetContextHeapDumpDirectoryProvider(
7+
private val heapDumpDirectoryName: String
8+
) : HeapDumpDirectoryProvider {
9+
10+
private val heapDumpDirectory by lazy {
11+
File(
12+
InstrumentationRegistry.getInstrumentation().targetContext.filesDir,
13+
heapDumpDirectoryName
14+
).apply {
15+
mkdir()
16+
check(exists()) {
17+
"Expected heap dump directory $absolutePath to exist"
18+
}
19+
}
20+
}
21+
22+
override fun heapDumpDirectory() = heapDumpDirectory
23+
}

leakcanary/leakcanary-android-uiautomator/api/leakcanary-android-uiautomator.api

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
public final class leakcanary/AndroidDeviceTempHeapDumpDirectoryProvider : leakcanary/HeapDumpDirectoryProvider {
2+
public fun <init> (Ljava/lang/String;)V
3+
public fun heapDumpDirectory ()Ljava/io/File;
4+
}
5+
16
public final class leakcanary/RepeatingUiAutomatorScenarioKt {
2-
public static final fun repeatingUiAutomatorScenario (Lshark/ObjectGrowthDetector;Ljava/lang/String;II)Lshark/RepeatingScenarioObjectGrowthDetector;
3-
public static synthetic fun repeatingUiAutomatorScenario$default (Lshark/ObjectGrowthDetector;Ljava/lang/String;IIILjava/lang/Object;)Lshark/RepeatingScenarioObjectGrowthDetector;
7+
public static final fun repeatingUiAutomatorScenario (Lshark/HeapDiff$Companion;Lshark/ObjectGrowthDetector;Ljava/lang/String;Lleakcanary/HeapDumpDirectoryProvider;Lleakcanary/HeapDumper;Lleakcanary/HeapDumpDeletionStrategy;)Lshark/RepeatingScenarioObjectGrowthDetector;
8+
public static synthetic fun repeatingUiAutomatorScenario$default (Lshark/HeapDiff$Companion;Lshark/ObjectGrowthDetector;Ljava/lang/String;Lleakcanary/HeapDumpDirectoryProvider;Lleakcanary/HeapDumper;Lleakcanary/HeapDumpDeletionStrategy;ILjava/lang/Object;)Lshark/RepeatingScenarioObjectGrowthDetector;
49
}
510

6-
public final class leakcanary/UiAutomatorShellFileDeleter : leakcanary/FileDeleter {
11+
public final class leakcanary/UiAutomatorShellFileDeleter {
712
public static final field INSTANCE Lleakcanary/UiAutomatorShellFileDeleter;
8-
public fun delete (Ljava/io/File;)V
13+
public final fun deleteFileUsingShell (Ljava/io/File;)V
914
}
1015

1116
public final class leakcanary/UiAutomatorShellHeapDumper : leakcanary/HeapDumper {

leakcanary/leakcanary-android-uiautomator/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ plugins {
66

77
dependencies {
88
api projects.leakcanary.leakcanaryCore
9+
api projects.leakcanary.leakcanaryTestCore
910
api projects.shark.sharkAndroid
1011
api libs.androidX.test.uiautomator
1112

@@ -16,7 +17,7 @@ android {
1617
compileSdk versions.compileSdk
1718
defaultConfig {
1819
targetSdk versions.compileSdk
19-
minSdk versions.minSdk
20+
minSdk 18
2021
}
2122
buildFeatures.buildConfig = false
2223
namespace 'com.squareup.leakcanary.android.uiautomator'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package leakcanary
2+
3+
import java.io.File
4+
5+
class AndroidDeviceTempHeapDumpDirectoryProvider(
6+
private val heapDumpDirectoryName: String
7+
) : HeapDumpDirectoryProvider {
8+
9+
private val heapDumpDirectory by lazy {
10+
File("/data/local/tmp/", heapDumpDirectoryName).apply {
11+
mkdir()
12+
check(exists()) {
13+
"Expected heap dump directory $absolutePath to exist"
14+
}
15+
}
16+
}
17+
18+
override fun heapDumpDirectory() = heapDumpDirectory
19+
}
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,36 @@
11
package leakcanary
22

33
import androidx.test.platform.app.InstrumentationRegistry
4-
import java.io.File
5-
import shark.RepeatingScenarioObjectGrowthDetector
6-
import shark.HeapGraphProvider
4+
import shark.HeapDiff
75
import shark.ObjectGrowthDetector
8-
import shark.repeatingScenario
6+
import shark.RepeatingScenarioObjectGrowthDetector
7+
import shark.forAndroidHeap
98

109
/**
1110
* Creates a [RepeatingScenarioObjectGrowthDetector] suitable for Android UI Automator tests.
12-
* Typically called on a [ObjectGrowthDetector] created via [shark.forAndroidHeap].
1311
*
1412
* Dumps the heap by leveraging adb, running a GC on API 27+ right before dumping.
15-
* Deletes the heap dump file as soon as we're done traversing it.
1613
*
1714
* @see [RepeatingScenarioObjectGrowthDetector.findRepeatedlyGrowingObjects]
1815
*/
19-
fun ObjectGrowthDetector.repeatingUiAutomatorScenario(
16+
fun HeapDiff.Companion.repeatingUiAutomatorScenario(
17+
objectGrowthDetector: ObjectGrowthDetector = ObjectGrowthDetector.forAndroidHeap(),
2018
dumpedAppPackageName: String = InstrumentationRegistry.getInstrumentation().targetContext.packageName,
21-
maxHeapDumps: Int = RepeatingScenarioObjectGrowthDetector.DEFAULT_MAX_HEAP_DUMPS,
22-
scenarioLoopsPerDump: Int = RepeatingScenarioObjectGrowthDetector.DEFAULT_SCENARIO_LOOPS_PER_DUMP,
19+
heapDumpDirectoryProvider: HeapDumpDirectoryProvider = AndroidDeviceTempHeapDumpDirectoryProvider(
20+
heapDumpDirectoryName = "heap_dumps_object_growth_$dumpedAppPackageName"
21+
),
22+
heapDumper: HeapDumper = HeapDumper.forUiAutomatorAsShell(
23+
withGc = true,
24+
dumpedAppPackageName = dumpedAppPackageName
25+
),
26+
heapDumpDeletionStrategy: HeapDumpDeletionStrategy = HeapDumpDeletionStrategy.DeleteOnHeapDumpClose { heapDumpFile ->
27+
UiAutomatorShellFileDeleter.deleteFileUsingShell(heapDumpFile)
28+
},
2329
): RepeatingScenarioObjectGrowthDetector {
24-
return repeatingScenario(
25-
heapGraphProvider = HeapGraphProvider.dumpingAndDeleting(
26-
heapDumper = HeapDumper.forUiAutomatorAsShell(
27-
withGc = true,
28-
dumpedAppPackageName = dumpedAppPackageName
29-
),
30-
heapDumpFileProvider = HeapDumpFileProvider.datetimeFormatted(
31-
directory = File("/data/local/tmp/"),
32-
suffix = "-$dumpedAppPackageName"
33-
),
34-
fileDeleter = UiAutomatorShellFileDeleter
35-
),
36-
maxHeapDumps = maxHeapDumps,
37-
scenarioLoopsPerDump = scenarioLoopsPerDump,
30+
return repeatingDumpingTestScenario(
31+
objectGrowthDetector = objectGrowthDetector,
32+
heapDumpDirectoryProvider = heapDumpDirectoryProvider,
33+
heapDumper = heapDumper,
34+
heapDumpDeletionStrategy = heapDumpDeletionStrategy,
3835
)
3936
}

leakcanary/leakcanary-android-uiautomator/src/main/java/leakcanary/UiAutomatorShellFileDeleter.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import androidx.test.platform.app.InstrumentationRegistry
44
import androidx.test.uiautomator.UiDevice
55
import java.io.File
66

7-
object UiAutomatorShellFileDeleter : FileDeleter {
8-
override fun delete(file: File) {
7+
object UiAutomatorShellFileDeleter {
8+
fun deleteFileUsingShell(file: File) {
99
val instrumentation = InstrumentationRegistry.getInstrumentation()
1010
val device = UiDevice.getInstance(instrumentation)
1111
device.executeShellCommand("rm ${file.absolutePath}")
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,32 @@
1-
public final class leakcanary/DateFormatHeapDumpFileProvider : leakcanary/HeapDumpFileProvider {
2-
public static final field Companion Lleakcanary/DateFormatHeapDumpFileProvider$Companion;
1+
public final class leakcanary/DatetimeFormattedHeapDumpFileProvider : leakcanary/HeapDumpFileProvider {
2+
public static final field Companion Lleakcanary/DatetimeFormattedHeapDumpFileProvider$Companion;
33
public static final field TIME_PATTERN Ljava/lang/String;
4-
public fun <init> (Ljava/io/File;Lkotlin/jvm/functions/Function0;Ljava/lang/String;Ljava/lang/String;)V
5-
public synthetic fun <init> (Ljava/io/File;Lkotlin/jvm/functions/Function0;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
4+
public fun <init> (Lleakcanary/HeapDumpDirectoryProvider;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;)V
5+
public synthetic fun <init> (Lleakcanary/HeapDumpDirectoryProvider;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
66
public fun newHeapDumpFile ()Ljava/io/File;
77
}
88

9-
public final class leakcanary/DateFormatHeapDumpFileProvider$Companion {
9+
public final class leakcanary/DatetimeFormattedHeapDumpFileProvider$Companion {
1010
}
1111

12-
public final class leakcanary/DateFormatHeapDumpFileProviderKt {
13-
public static final fun datetimeFormatted (Lleakcanary/HeapDumpFileProvider$Companion;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)Lleakcanary/HeapDumpFileProvider;
14-
public static synthetic fun datetimeFormatted$default (Lleakcanary/HeapDumpFileProvider$Companion;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lleakcanary/HeapDumpFileProvider;
15-
}
16-
17-
public final class leakcanary/DumpingAndDeletingHeapGraphProvider : shark/HeapGraphProvider {
18-
public fun <init> (Lleakcanary/HeapDumpFileProvider;Lleakcanary/HeapDumper;Lleakcanary/FileDeleter;)V
12+
public final class leakcanary/DumpingHeapGraphProvider : shark/HeapGraphProvider {
13+
public fun <init> (Lleakcanary/HeapDumpFileProvider;Lleakcanary/HeapDumper;Lleakcanary/DumpingHeapGraphProvider$HeapDumpClosedListener;)V
14+
public synthetic fun <init> (Lleakcanary/HeapDumpFileProvider;Lleakcanary/HeapDumper;Lleakcanary/DumpingHeapGraphProvider$HeapDumpClosedListener;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1915
public fun openHeapGraph ()Lshark/CloseableHeapGraph;
2016
}
2117

22-
public final class leakcanary/DumpingAndDeletingHeapGraphProviderKt {
23-
public static final fun dumpingAndDeleting (Lshark/HeapGraphProvider$Companion;Lleakcanary/HeapDumper;Lleakcanary/HeapDumpFileProvider;Lleakcanary/FileDeleter;)Lleakcanary/DumpingAndDeletingHeapGraphProvider;
24-
public static synthetic fun dumpingAndDeleting$default (Lshark/HeapGraphProvider$Companion;Lleakcanary/HeapDumper;Lleakcanary/HeapDumpFileProvider;Lleakcanary/FileDeleter;ILjava/lang/Object;)Lleakcanary/DumpingAndDeletingHeapGraphProvider;
18+
public abstract interface class leakcanary/DumpingHeapGraphProvider$HeapDumpClosedListener {
19+
public abstract fun onHeapDumpClosed (Ljava/io/File;)V
2520
}
2621

27-
public abstract interface class leakcanary/FileDeleter {
28-
public abstract fun delete (Ljava/io/File;)V
22+
public abstract interface class leakcanary/HeapDumpDirectoryProvider {
23+
public abstract fun heapDumpDirectory ()Ljava/io/File;
2924
}
3025

3126
public abstract interface class leakcanary/HeapDumpFileProvider {
32-
public static final field Companion Lleakcanary/HeapDumpFileProvider$Companion;
3327
public abstract fun newHeapDumpFile ()Ljava/io/File;
3428
}
3529

36-
public final class leakcanary/HeapDumpFileProvider$Companion {
37-
}
38-
3930
public abstract interface class leakcanary/HeapDumper {
4031
public static final field Companion Lleakcanary/HeapDumper$Companion;
4132
public abstract fun dumpHeap (Ljava/io/File;)V
@@ -62,12 +53,8 @@ public final class leakcanary/ObjectGrowthWarmupHeapDumperKt {
6253
public static final fun withDetectorWarmup (Lleakcanary/HeapDumper;Lshark/ObjectGrowthDetector;Z)Lleakcanary/HeapDumper;
6354
}
6455

65-
public final class leakcanary/TempHeapDumpFileProvider : leakcanary/HeapDumpFileProvider {
66-
public static final field INSTANCE Lleakcanary/TempHeapDumpFileProvider;
67-
public fun newHeapDumpFile ()Ljava/io/File;
68-
}
69-
70-
public final class leakcanary/TempHeapDumpFileProviderKt {
71-
public static final fun tempFile (Lleakcanary/HeapDumpFileProvider$Companion;)Lleakcanary/HeapDumpFileProvider;
56+
public final class leakcanary/WorkingDirectoryHeapDumpDirectoryProvider : leakcanary/HeapDumpDirectoryProvider {
57+
public fun <init> (Ljava/lang/String;)V
58+
public fun heapDumpDirectory ()Ljava/io/File;
7259
}
7360

0 commit comments

Comments
 (0)