updated task executor
This commit is contained in:
parent
dd457f0db6
commit
7fc98f6ec0
|
@ -65,6 +65,7 @@ subprojects {
|
|||
AndroidImageCropper : '2.4.0',
|
||||
ExportablePreferences: '0.9.6',
|
||||
ACRA : '4.9.2',
|
||||
AbstractTask : '0.9.5',
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ dependencies {
|
|||
compile "com.github.mariotaku:SQLiteQB:${libVersions['SQLiteQB']}"
|
||||
compile "com.github.mariotaku.ObjectCursor:core:${libVersions['ObjectCursor']}"
|
||||
compile "com.github.mariotaku.ExportablePreferences:core:${libVersions['ExportablePreferences']}"
|
||||
compile 'com.github.mariotaku:AbstractTask:0.9.4'
|
||||
compile "com.github.mariotaku:AbstractTask:${libVersions['AbstractTask']}"
|
||||
compile "com.github.mariotaku.CommonsLibrary:parcel:${libVersions['MariotakuCommons']}"
|
||||
compile "com.github.mariotaku.CommonsLibrary:io:${libVersions['MariotakuCommons']}"
|
||||
compile "com.github.mariotaku.CommonsLibrary:text:${libVersions['MariotakuCommons']}"
|
||||
|
|
|
@ -34,6 +34,7 @@ import com.bumptech.glide.Glide
|
|||
import nl.komponents.kovenant.task
|
||||
import okhttp3.Dns
|
||||
import org.apache.commons.lang3.concurrent.ConcurrentUtils
|
||||
import org.mariotaku.abstask.library.TaskStarter
|
||||
import org.mariotaku.commons.logansquare.LoganSquareMapperFinder
|
||||
import org.mariotaku.kpreferences.KPreferences
|
||||
import org.mariotaku.kpreferences.get
|
||||
|
@ -318,6 +319,7 @@ class TwidereApplication : Application(), Constants, OnSharedPreferenceChangeLis
|
|||
Class.forName(AsyncTask::class.java.name)
|
||||
} catch (ignore: ClassNotFoundException) {
|
||||
}
|
||||
TaskStarter.setDefaultExecutor(AsyncTask.SERIAL_EXECUTOR)
|
||||
val executor = Executors.newSingleThreadExecutor()
|
||||
LoganSquareMapperFinder.setDefaultExecutor(object : LoganSquareMapperFinder.FutureExecutor {
|
||||
override fun <T> submit(callable: Callable<T>): Future<T> {
|
||||
|
|
Loading…
Reference in New Issue