aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-10-29 20:30:14 +0100
committerChristian Schneppe <christian@pix-art.de>2017-10-29 20:30:14 +0100
commit92bc76d10f5058217864021ae1a097a5d6134f8b (patch)
tree55ebcf62bba297b3b1d6406c0ec26b6fe8083e0d /src/main/java/de
parent58e0c013757450dded472c3034280fbb4f81d4db (diff)
UpdateService: use THREAD_POOL_EXECUTOR
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/pixart/messenger/services/UpdateService.java3
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java2
3 files changed, 4 insertions, 3 deletions
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<String, Object, UpdateService.Wrapper> {
- 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();
}