mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-01-05 12:26:45 +01:00
adding Leak Canary
This commit is contained in:
parent
027005986b
commit
bb18218c0a
@ -31,6 +31,13 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
ext {
|
||||
leakCanaryVersion = '1.5.4'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
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.READ_CONTACTS"/>
|
||||
<uses-permission android:name="android.permission.WRITE_CONTACTS"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
|
||||
<uses-permission
|
||||
android:name="android.permission.USE_FINGERPRINT"
|
||||
|
@ -2,10 +2,18 @@ package com.simplemobiletools.contacts
|
||||
|
||||
import android.app.Application
|
||||
import com.simplemobiletools.commons.extensions.checkUseEnglish
|
||||
import com.squareup.leakcanary.LeakCanary
|
||||
|
||||
class App : Application() {
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
if (BuildConfig.DEBUG) {
|
||||
if (LeakCanary.isInAnalyzerProcess(this)) {
|
||||
return
|
||||
}
|
||||
LeakCanary.install(this)
|
||||
}
|
||||
|
||||
checkUseEnglish()
|
||||
}
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
||||
selection += " AND ${ContactsContract.RawContacts.ACCOUNT_NAME} IN ($questionMarks)"
|
||||
selectionArgs += sources.toTypedArray()
|
||||
}
|
||||
|
||||
val sortOrder = getSortString()
|
||||
var cursor: Cursor? = null
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user