Browse Source

Run all executors in background

main
M66B 6 years ago
parent
commit
7c6841b936
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/src/main/java/eu/faircode/email/EntityLog.java
  2. +1
    -1
      app/src/main/java/eu/faircode/email/FragmentMessages.java

+ 1
- 1
app/src/main/java/eu/faircode/email/EntityLog.java View File

@ -49,7 +49,7 @@ public class EntityLog {
@NonNull @NonNull
public String data; public String data;
private static ExecutorService executor = Executors.newSingleThreadExecutor();
private static ExecutorService executor = Executors.newSingleThreadExecutor(Helper.backgroundThreadFactory);
static void log(Context context, String data) { static void log(Context context, String data) {
Log.i(Helper.TAG, data); Log.i(Helper.TAG, data);


+ 1
- 1
app/src/main/java/eu/faircode/email/FragmentMessages.java View File

@ -88,7 +88,7 @@ public class FragmentMessages extends FragmentEx {
private SearchState searchState = SearchState.Reset; private SearchState searchState = SearchState.Reset;
private BoundaryCallbackMessages searchCallback = null; private BoundaryCallbackMessages searchCallback = null;
private ExecutorService executor = Executors.newCachedThreadPool();
private ExecutorService executor = Executors.newCachedThreadPool(Helper.backgroundThreadFactory);
private static final int MESSAGES_PAGE_SIZE = 50; private static final int MESSAGES_PAGE_SIZE = 50;
private static final int SEARCH_PAGE_SIZE = 10; private static final int SEARCH_PAGE_SIZE = 10;


Loading…
Cancel
Save