Unified executor model

This commit is contained in:
M66B
2022-12-13 10:52:39 +01:00
parent 101371854b
commit 6988d4c552
33 changed files with 147 additions and 297 deletions

View File

@@ -36,7 +36,6 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ExecutorService;
public class ServiceExternal extends Service {
private static final String ACTION_POLL = BuildConfig.APPLICATION_ID + ".POLL";
@@ -51,10 +50,6 @@ public class ServiceExternal extends Service {
// adb shell am start-foreground-service -a eu.faircode.email.INTERVAL --ei minutes {0, 15, 30, 60, 120, 240, 480, 1440}
// adb shell am start-foreground-service -a eu.faircode.email.DISCONNECT
private static final ExecutorService executor =
Helper.getBackgroundExecutor(1, "external");
@Override
public void onCreate() {
Log.i("Service external create");
@@ -86,7 +81,7 @@ public class ServiceExternal extends Service {
EntityLog.log(this, action);
final Context context = getApplicationContext();
executor.submit(new Runnable() {
Helper.getSerialExecutor().submit(new Runnable() {
@Override
public void run() {
try {