adding Leakcanary

This commit is contained in:
tibbi
2017-11-10 15:32:34 +01:00
parent bff373afac
commit 1ef3528a62
2 changed files with 18 additions and 0 deletions

View File

@ -2,10 +2,19 @@ package com.simplemobiletools.notes
import android.app.Application
import com.facebook.stetho.Stetho
import com.simplemobiletools.notes.BuildConfig.USE_LEAK_CANARY
import com.squareup.leakcanary.LeakCanary
class App : Application() {
override fun onCreate() {
super.onCreate()
if (USE_LEAK_CANARY) {
if (LeakCanary.isInAnalyzerProcess(this)) {
return
}
LeakCanary.install(this)
}
if (BuildConfig.DEBUG)
Stetho.initializeWithDefaults(this)
}