From 92bc76d10f5058217864021ae1a097a5d6134f8b Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sun, 29 Oct 2017 20:30:14 +0100 Subject: UpdateService: use THREAD_POOL_EXECUTOR --- src/main/java/de/pixart/messenger/services/UpdateService.java | 3 ++- src/main/java/de/pixart/messenger/ui/ConversationActivity.java | 2 +- src/main/java/de/pixart/messenger/ui/XmppActivity.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/java/de/pixart/messenger/services/UpdateService.java b/src/main/java/de/pixart/messenger/services/UpdateService.java index 95204b584..9ce27b6c9 100644 --- a/src/main/java/de/pixart/messenger/services/UpdateService.java +++ b/src/main/java/de/pixart/messenger/services/UpdateService.java @@ -29,7 +29,8 @@ import de.pixart.messenger.ui.UpdaterActivity; import static de.pixart.messenger.services.NotificationService.UPDATE_NOTIFICATION_ID; public class UpdateService extends AsyncTask { - public UpdateService (){} + public UpdateService (){ + } private Context context; diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java index 895ce5063..5126be565 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java @@ -391,7 +391,7 @@ public class ConversationActivity extends XmppActivity editor.commit(); Log.d(Config.LOGTAG, "AppUpdater: CurrentTime: " + lastUpdateTime); UpdateService task = new UpdateService(this); - task.execute("false"); + task.executeOnExecutor(UpdateService.THREAD_POOL_EXECUTOR, "false"); Log.d(Config.LOGTAG, "AppUpdater started"); } else { Log.d(Config.LOGTAG, "AppUpdater stopped"); diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index 840e29692..23b8a16f5 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -379,7 +379,7 @@ public abstract class XmppActivity extends Activity { case R.id.action_check_updates: if (xmppConnectionService.hasInternetConnection()) { UpdateService task = new UpdateService(this); - task.execute("true"); + task.executeOnExecutor(UpdateService.THREAD_POOL_EXECUTOR, "true"); } else { Toast.makeText(this, R.string.account_status_no_internet, Toast.LENGTH_LONG).show(); } -- cgit v1.2.3