remove the use_leak_canary constant

This commit is contained in:
tibbi 2017-12-03 23:21:24 +01:00
parent eeb1077fc2
commit 7f69a0af57
2 changed files with 1 additions and 6 deletions

View File

@ -20,14 +20,10 @@ android {
} }
buildTypes { buildTypes {
debug {
buildConfigField "boolean", "USE_LEAK_CANARY", "true"
}
release { release {
minifyEnabled true minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release signingConfig signingConfigs.release
buildConfigField "boolean", "USE_LEAK_CANARY", "false"
} }
} }

View File

@ -1,14 +1,13 @@
package com.simplemobiletools.camera package com.simplemobiletools.camera
import android.app.Application import android.app.Application
import com.simplemobiletools.camera.BuildConfig.USE_LEAK_CANARY
import com.simplemobiletools.commons.extensions.checkUseEnglish import com.simplemobiletools.commons.extensions.checkUseEnglish
import com.squareup.leakcanary.LeakCanary import com.squareup.leakcanary.LeakCanary
class App : Application() { class App : Application() {
override fun onCreate() { override fun onCreate() {
super.onCreate() super.onCreate()
if (USE_LEAK_CANARY) { if (BuildConfig.DEBUG) {
if (LeakCanary.isInAnalyzerProcess(this)) { if (LeakCanary.isInAnalyzerProcess(this)) {
return return
} }