fix #302, add a toggle for disabling leak canary
This commit is contained in:
parent
16391bce10
commit
3df76261e0
|
@ -4,11 +4,14 @@ import android.app.Application
|
|||
import com.squareup.leakcanary.LeakCanary
|
||||
|
||||
class App : Application() {
|
||||
val USE_LEAK_CANARY = false
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
if (LeakCanary.isInAnalyzerProcess(this)) {
|
||||
return
|
||||
if (USE_LEAK_CANARY) {
|
||||
if (LeakCanary.isInAnalyzerProcess(this)) {
|
||||
return
|
||||
}
|
||||
LeakCanary.install(this)
|
||||
}
|
||||
LeakCanary.install(this)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue