mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +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
|
import com.squareup.leakcanary.LeakCanary
|
||||||
|
|
||||||
class App : Application() {
|
class App : Application() {
|
||||||
|
val USE_LEAK_CANARY = false
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
|
if (USE_LEAK_CANARY) {
|
||||||
if (LeakCanary.isInAnalyzerProcess(this)) {
|
if (LeakCanary.isInAnalyzerProcess(this)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
LeakCanary.install(this)
|
LeakCanary.install(this)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue