Skip to content

Commit a25d758

Browse files
committed
updated to LeakCanary v1.6.1
1 parent 9c165c9 commit a25d758

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

Leaks/AsyncTask/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
apply plugin: 'com.android.application'
22

33
dependencies {
4-
implementation 'com.android.support:support-fragment:27.1.0'
5-
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
6-
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
4+
implementation 'com.android.support:support-fragment:27.1.1'
5+
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.1'
6+
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.1'
77
}
88

99
android {

Leaks/AsyncTask/app/src/main/java/com/commonsware/android/async/CanaryApplication.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ public class CanaryApplication extends Application {
2222
public void onCreate() {
2323
super.onCreate();
2424

25+
if (LeakCanary.isInAnalyzerProcess(this)) {
26+
// LeakCanary is processing a heap dump here; please do not disturb!
27+
return;
28+
}
29+
2530
LeakCanary.install(this);
31+
32+
// do your normal initialization work here
2633
}
2734
}

0 commit comments

Comments
 (0)