From ff3812eddb5c5cad0eae615976b3db9215a2953c Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 4 Jul 2017 21:21:34 +0200 Subject: [PATCH] Attepmt to fix thread pool exhausted problem --- app/src/main/java/eu/faircode/netguard/AdapterAccess.java | 2 +- app/src/main/java/eu/faircode/netguard/AdapterLog.java | 4 ++-- app/src/main/java/eu/faircode/netguard/AdapterRule.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/netguard/AdapterAccess.java b/app/src/main/java/eu/faircode/netguard/AdapterAccess.java index 095cb450..b3c93a5c 100644 --- a/app/src/main/java/eu/faircode/netguard/AdapterAccess.java +++ b/app/src/main/java/eu/faircode/netguard/AdapterAccess.java @@ -161,7 +161,7 @@ public class AdapterAccess extends CursorAdapter { " >" + addr + (dport > 0 ? "/" + dport : "")); ViewCompat.setHasTransientState(tvDest, false); } - }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, daddr); + }.execute(daddr); if (allowed < 0) tvDest.setTextColor(colorText); diff --git a/app/src/main/java/eu/faircode/netguard/AdapterLog.java b/app/src/main/java/eu/faircode/netguard/AdapterLog.java index c4af2f25..a2726561 100644 --- a/app/src/main/java/eu/faircode/netguard/AdapterLog.java +++ b/app/src/main/java/eu/faircode/netguard/AdapterLog.java @@ -265,7 +265,7 @@ public class AdapterLog extends CursorAdapter { tvDaddr.setText(">" + name); ViewCompat.setHasTransientState(tvDaddr, false); } - }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, daddr); + }.execute(daddr); } else tvDaddr.setText(dname); else @@ -299,7 +299,7 @@ public class AdapterLog extends CursorAdapter { } ViewCompat.setHasTransientState(tvOrganization, false); } - }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, daddr); + }.execute(daddr); } // Show extra data diff --git a/app/src/main/java/eu/faircode/netguard/AdapterRule.java b/app/src/main/java/eu/faircode/netguard/AdapterRule.java index ec7e3ba2..bea7bc66 100644 --- a/app/src/main/java/eu/faircode/netguard/AdapterRule.java +++ b/app/src/main/java/eu/faircode/netguard/AdapterRule.java @@ -749,7 +749,7 @@ public class AdapterRule extends RecyclerView.Adapter im rule.hosts = hosts; notifyDataSetChanged(); } - }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + }.execute(); return result; }