mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Use media executor
This commit is contained in:
@@ -248,6 +248,7 @@ public class Helper {
|
||||
private static ExecutorService sSerialExecutor = null;
|
||||
private static ExecutorService sParallelExecutor = null;
|
||||
private static ExecutorService sSerialTaskExecutor = null;
|
||||
private static ExecutorService sMediaExecutor = null;
|
||||
private static ExecutorService sDownloadExecutor = null;
|
||||
|
||||
private static int sOperationIndex = 0;
|
||||
@@ -271,6 +272,12 @@ public class Helper {
|
||||
return sSerialTaskExecutor;
|
||||
}
|
||||
|
||||
static ExecutorService getMediaTaskExecutor() {
|
||||
if (sMediaExecutor == null)
|
||||
sMediaExecutor = getBackgroundExecutor(0, 1, 3, "media");
|
||||
return sMediaExecutor;
|
||||
}
|
||||
|
||||
static ExecutorService getDownloadTaskExecutor() {
|
||||
if (sDownloadExecutor == null)
|
||||
sDownloadExecutor = getBackgroundExecutor(0, 0, 3, "download");
|
||||
|
||||
Reference in New Issue
Block a user