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

@@ -59,7 +59,6 @@ import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import javax.mail.Address;
import javax.mail.internet.AddressException;
@@ -73,8 +72,6 @@ public class EditTextMultiAutoComplete extends AppCompatMultiAutoCompleteTextVie
private Tokenizer tokenizer;
private Map<String, Integer> encryption = new ConcurrentHashMap<>();
private static final ExecutorService executor = Helper.getBackgroundExecutor(1, "chips");
private static int[] icons = new int[]{
R.drawable.twotone_vpn_key_24_p,
R.drawable.twotone_vpn_key_24_s,
@@ -339,7 +336,7 @@ public class EditTextMultiAutoComplete extends AppCompatMultiAutoCompleteTextVie
Integer has = encryption.get(email);
if (has == null) {
final List<Address> recipient = Arrays.asList(new Address[]{parsed[0]});
executor.submit(new Runnable() {
Helper.getParallelExecutor().submit(new Runnable() {
@Override
public void run() {
try {