update commons to 3.0.23 with minor improvements

This commit is contained in:
tibbi 2017-12-03 21:28:38 +01:00
parent c083976ec9
commit dd49d68069
3 changed files with 7 additions and 7 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"
} }
} }
@ -46,7 +42,7 @@ ext {
} }
dependencies { dependencies {
implementation 'com.simplemobiletools:commons:3.0.21' implementation 'com.simplemobiletools:commons:3.0.23'
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion" debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion" releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"

View File

@ -2,13 +2,12 @@ package com.simplemobiletools.draw
import android.app.Application import android.app.Application
import com.simplemobiletools.commons.extensions.checkUseEnglish import com.simplemobiletools.commons.extensions.checkUseEnglish
import com.simplemobiletools.draw.BuildConfig.USE_LEAK_CANARY
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
} }

View File

@ -88,6 +88,11 @@ class MainActivity : SimpleActivity(), CanvasListener {
storeStateVariables() storeStateVariables()
} }
override fun onDestroy() {
super.onDestroy()
my_canvas.mListener = null
}
override fun onCreateOptionsMenu(menu: Menu): Boolean { override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.menu, menu) menuInflater.inflate(R.menu.menu, menu)
menu.apply { menu.apply {