diff --git a/app/src/main/java/eu/faircode/email/ActivityAnswer.java b/app/src/main/java/eu/faircode/email/ActivityAnswer.java index bf435c6696..c361ee8577 100644 --- a/app/src/main/java/eu/faircode/email/ActivityAnswer.java +++ b/app/src/main/java/eu/faircode/email/ActivityAnswer.java @@ -40,7 +40,7 @@ import java.util.List; import java.util.concurrent.ExecutorService; public class ActivityAnswer extends ActivityBase { - private static ExecutorService executor = Helper.getBackgroundExecutor(1, "answer"); + private static final ExecutorService executor = Helper.getBackgroundExecutor(1, "answer"); @Override @RequiresApi(api = Build.VERSION_CODES.M) diff --git a/app/src/main/java/eu/faircode/email/EditTextMultiAutoComplete.java b/app/src/main/java/eu/faircode/email/EditTextMultiAutoComplete.java index 2f8c3d1610..7f289a9a3d 100644 --- a/app/src/main/java/eu/faircode/email/EditTextMultiAutoComplete.java +++ b/app/src/main/java/eu/faircode/email/EditTextMultiAutoComplete.java @@ -73,7 +73,7 @@ public class EditTextMultiAutoComplete extends AppCompatMultiAutoCompleteTextVie private Tokenizer tokenizer; private Map encryption = new ConcurrentHashMap<>(); - private static ExecutorService executor = Helper.getBackgroundExecutor(1, "chips"); + private static final ExecutorService executor = Helper.getBackgroundExecutor(1, "chips"); private static int[] icons = new int[]{ R.drawable.twotone_vpn_key_24_p, diff --git a/app/src/main/java/eu/faircode/email/EntityRule.java b/app/src/main/java/eu/faircode/email/EntityRule.java index 80547bf42e..9af54708ad 100644 --- a/app/src/main/java/eu/faircode/email/EntityRule.java +++ b/app/src/main/java/eu/faircode/email/EntityRule.java @@ -128,7 +128,7 @@ public class EntityRule { private static final long SEND_DELAY = 5000L; // milliseconds - private static ExecutorService executor = Helper.getBackgroundExecutor(1, "rule"); + private static final ExecutorService executor = Helper.getBackgroundExecutor(1, "rule"); static boolean needsHeaders(EntityMessage message, List rules) { return needs(rules, "header"); diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 100a6985c1..cc86f2e670 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -338,7 +338,7 @@ public class FragmentCompose extends FragmentBase { private static final int REQUEST_SEND = 14; private static final int REQUEST_REMOVE_ATTACHMENTS = 15; - private static ExecutorService executor = Helper.getBackgroundExecutor(1, "compose"); + private static final ExecutorService executor = Helper.getBackgroundExecutor(1, "compose"); @Override public void onCreate(Bundle savedInstanceState) { diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index c9d332cf4f..a388deb4ea 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -446,7 +446,7 @@ public class FragmentMessages extends FragmentBase "time", "unread", "starred", "priority" )); - private static ExecutorService executor = Helper.getBackgroundExecutor(1, "messages"); + private static final ExecutorService executor = Helper.getBackgroundExecutor(1, "messages"); @Override public void onCreate(Bundle savedInstanceState) { diff --git a/app/src/main/java/eu/faircode/email/MediaPlayerHelper.java b/app/src/main/java/eu/faircode/email/MediaPlayerHelper.java index d0ab47687a..3847e962b8 100644 --- a/app/src/main/java/eu/faircode/email/MediaPlayerHelper.java +++ b/app/src/main/java/eu/faircode/email/MediaPlayerHelper.java @@ -22,7 +22,7 @@ public class MediaPlayerHelper { static final int DEFAULT_SOUND_DURATION = 30; // seconds static final int DEFAULT_ALARM_DURATION = 30; // seconds - private static ExecutorService executor = Helper.getBackgroundExecutor(1, "media"); + private static final ExecutorService executor = Helper.getBackgroundExecutor(1, "media"); static void queue(Context context, String uri) { try { diff --git a/app/src/main/java/eu/faircode/email/ServiceSend.java b/app/src/main/java/eu/faircode/email/ServiceSend.java index c995ea46f1..75ea214ad3 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSend.java +++ b/app/src/main/java/eu/faircode/email/ServiceSend.java @@ -78,7 +78,7 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar private PowerManager.WakeLock wlOutbox; private List handling = new ArrayList<>(); - private static ExecutorService executor = Helper.getBackgroundExecutor(1, "send"); + private static final ExecutorService executor = Helper.getBackgroundExecutor(1, "send"); private static final int RETRY_MAX = 3; private static final int CONNECTIVITY_DELAY = 5000; // milliseconds