diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-07-29 15:30:09 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-07-29 15:30:09 +0200 |
commit | d8ee029f3743bded09641343926151bab0254d52 (patch) | |
tree | 2a473f3ea3a884d1eabbb4f2234a83d06d8e5d7e /src/main | |
parent | f2a86b4cbd2c58ac9a8a1f69ffad4278418bc866 (diff) |
fix crash during lookup for updates
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/UpdateService.java | 3 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationsActivity.java | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/services/UpdateService.java b/src/main/java/de/pixart/messenger/services/UpdateService.java index da940f7b7..7e636b8e6 100644 --- a/src/main/java/de/pixart/messenger/services/UpdateService.java +++ b/src/main/java/de/pixart/messenger/services/UpdateService.java @@ -30,14 +30,13 @@ import static de.pixart.messenger.http.HttpConnectionManager.getProxy; import static de.pixart.messenger.services.NotificationService.UPDATE_NOTIFICATION_ID; public class UpdateService extends AsyncTask<String, Object, UpdateService.Wrapper> { - XmppConnectionService mXmppConnectionService; private boolean mUseTor; private Context context; private boolean playstore; public UpdateService() { } - public UpdateService(Context context, boolean PlayStore) { + public UpdateService(Context context, boolean PlayStore, XmppConnectionService mXmppConnectionService) { this.context = context; this.playstore = PlayStore; this.mUseTor = mXmppConnectionService.useTorToConnect(); diff --git a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java index 91170567d..67618dc65 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java @@ -562,7 +562,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio if (!installFromUnknownSourceAllowed() && !xmppConnectionService.installedFromPlayStore()) { openInstallFromUnknownSourcesDialogIfNeeded(); } else { - UpdateService task = new UpdateService(this, xmppConnectionService.installedFromPlayStore()); + UpdateService task = new UpdateService(this, xmppConnectionService.installedFromPlayStore(), xmppConnectionService); task.executeOnExecutor(UpdateService.THREAD_POOL_EXECUTOR, "true"); Log.d(Config.LOGTAG, "AppUpdater started"); } @@ -957,7 +957,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio if (!installFromUnknownSourceAllowed() && !PlayStore) { openInstallFromUnknownSourcesDialogIfNeeded(); } else { - UpdateService task = new UpdateService(this, PlayStore); + UpdateService task = new UpdateService(this, PlayStore, xmppConnectionService); task.executeOnExecutor(UpdateService.THREAD_POOL_EXECUTOR, "false"); Log.d(Config.LOGTAG, "AppUpdater started"); } |