From a56bbbd54a95e2da9aad3c8aa16f07fd19d7b5c1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 1 Dec 2017 23:35:36 +0100 Subject: [PATCH] simplify Leak Canary initialization --- app/build.gradle | 6 +----- app/src/main/kotlin/com/simplemobiletools/gallery/App.kt | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 6c2af3e29..ecc42f977 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,14 +21,10 @@ android { } buildTypes { - debug { - buildConfigField "boolean", "USE_LEAK_CANARY", "true" - } release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release - buildConfigField "boolean", "USE_LEAK_CANARY", "false" } } @@ -47,7 +43,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.0.20' + implementation 'com.simplemobiletools:commons:3.0.21' implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.8.0' implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.0' implementation 'com.android.support:multidex:1.0.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/App.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/App.kt index 2099d83cc..665817fb5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/App.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/App.kt @@ -3,13 +3,12 @@ package com.simplemobiletools.gallery import android.support.multidex.MultiDexApplication import com.github.ajalt.reprint.core.Reprint import com.simplemobiletools.commons.extensions.checkUseEnglish -import com.simplemobiletools.gallery.BuildConfig.USE_LEAK_CANARY import com.squareup.leakcanary.LeakCanary class App : MultiDexApplication() { override fun onCreate() { super.onCreate() - if (USE_LEAK_CANARY) { + if (BuildConfig.DEBUG) { if (LeakCanary.isInAnalyzerProcess(this)) { return }