aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-05-17 21:37:00 +0200
committerChristian Schneppe <christian@pix-art.de>2017-05-17 21:37:00 +0200
commita57eba2eeaf462e09f963621e34d98a4363bfa60 (patch)
tree061d18d33bc356f435e7e2eca7dab83da0d0902b /src/main/java/de/pixart
parentf6ad884c02bd5c76f965a05fd41ed7cc3ec38600 (diff)
make updater more failsave
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/ui/UpdaterActivity.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java b/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java
index 1d24047de..d5a1a04f8 100644
--- a/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java
@@ -46,6 +46,12 @@ public class UpdaterActivity extends Activity {
@Override
public void onReceive(Context context, Intent intent) {
+ if (intent == null) {
+ Toast.makeText(getApplicationContext(),
+ getText(R.string.failed),
+ Toast.LENGTH_LONG).show();
+ UpdaterActivity.this.finish();
+ }
//check if the broadcast message is for our Enqueued download
long referenceId = intent.getExtras().getLong(DownloadManager.EXTRA_DOWNLOAD_ID);
if (downloadReference == referenceId) {