From 7c6841b936bd307f860ea418bbe242567841ae7b Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 14 Sep 2018 17:34:03 +0000 Subject: [PATCH] Run all executors in background --- app/src/main/java/eu/faircode/email/EntityLog.java | 2 +- app/src/main/java/eu/faircode/email/FragmentMessages.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/EntityLog.java b/app/src/main/java/eu/faircode/email/EntityLog.java index 82e253f76d..3888d3411d 100644 --- a/app/src/main/java/eu/faircode/email/EntityLog.java +++ b/app/src/main/java/eu/faircode/email/EntityLog.java @@ -49,7 +49,7 @@ public class EntityLog { @NonNull public String data; - private static ExecutorService executor = Executors.newSingleThreadExecutor(); + private static ExecutorService executor = Executors.newSingleThreadExecutor(Helper.backgroundThreadFactory); static void log(Context context, String data) { Log.i(Helper.TAG, data); diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index ab1926054b..cc6934f9a0 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -88,7 +88,7 @@ public class FragmentMessages extends FragmentEx { private SearchState searchState = SearchState.Reset; 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 SEARCH_PAGE_SIZE = 10;