mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
fix #302, add a toggle for disabling leak canary
This commit is contained in:
parent
16391bce10
commit
3df76261e0
1 changed files with 6 additions and 3 deletions
|
@ -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 a new issue