adding Leak Canary
This commit is contained in:
parent
027005986b
commit
bb18218c0a
4 changed files with 17 additions and 0 deletions
|
|
@ -31,6 +31,13 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext {
|
||||||
|
leakCanaryVersion = '1.5.4'
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:3.2.19'
|
implementation 'com.simplemobiletools:commons:3.2.19'
|
||||||
|
|
||||||
|
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
|
||||||
|
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
<uses-permission android:name="android.permission.CALL_PHONE"/>
|
<uses-permission android:name="android.permission.CALL_PHONE"/>
|
||||||
<uses-permission android:name="android.permission.READ_CONTACTS"/>
|
<uses-permission android:name="android.permission.READ_CONTACTS"/>
|
||||||
<uses-permission android:name="android.permission.WRITE_CONTACTS"/>
|
<uses-permission android:name="android.permission.WRITE_CONTACTS"/>
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||||
|
|
||||||
<uses-permission
|
<uses-permission
|
||||||
android:name="android.permission.USE_FINGERPRINT"
|
android:name="android.permission.USE_FINGERPRINT"
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,18 @@ package com.simplemobiletools.contacts
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import com.simplemobiletools.commons.extensions.checkUseEnglish
|
import com.simplemobiletools.commons.extensions.checkUseEnglish
|
||||||
|
import com.squareup.leakcanary.LeakCanary
|
||||||
|
|
||||||
class App : Application() {
|
class App : Application() {
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
|
if (BuildConfig.DEBUG) {
|
||||||
|
if (LeakCanary.isInAnalyzerProcess(this)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
LeakCanary.install(this)
|
||||||
|
}
|
||||||
|
|
||||||
checkUseEnglish()
|
checkUseEnglish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
||||||
selection += " AND ${ContactsContract.RawContacts.ACCOUNT_NAME} IN ($questionMarks)"
|
selection += " AND ${ContactsContract.RawContacts.ACCOUNT_NAME} IN ($questionMarks)"
|
||||||
selectionArgs += sources.toTypedArray()
|
selectionArgs += sources.toTypedArray()
|
||||||
}
|
}
|
||||||
|
|
||||||
val sortOrder = getSortString()
|
val sortOrder = getSortString()
|
||||||
var cursor: Cursor? = null
|
var cursor: Cursor? = null
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue