aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-03-14 21:40:29 +0100
committerChristian Schneppe <christian@pix-art.de>2019-03-14 21:40:29 +0100
commitd1a2c5b7a7a71c3d877508f0e8ebfe1176b63b12 (patch)
treeef6e874eff51e7edbcc6cd6e66697b1e576152f1 /src
parentd74cf5b6f0ed5b493ea4953f57a93347c03253b3 (diff)
fix some crashes
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/services/AlarmReceiver.java4
-rw-r--r--src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java3
-rw-r--r--src/main/java/de/pixart/messenger/utils/RichPreview.java2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/services/AlarmReceiver.java b/src/main/java/de/pixart/messenger/services/AlarmReceiver.java
index 887a59684..74ee14345 100644
--- a/src/main/java/de/pixart/messenger/services/AlarmReceiver.java
+++ b/src/main/java/de/pixart/messenger/services/AlarmReceiver.java
@@ -15,7 +15,9 @@ public class AlarmReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
if (intent.getAction().contains("exportlogs")) {
Log.d(Config.LOGTAG, "Received alarm broadcast to export logs");
- Compatibility.startService(context, new Intent(context, ExportBackupService.class));
+ final Intent backupIntent = new Intent(context, ExportBackupService.class);
+ backupIntent.putExtra("NOTIFY_ON_BACKUP_COMPLETE", false);
+ Compatibility.startService(context, intent);
}
}
}
diff --git a/src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java b/src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java
index ec99c6aee..110665001 100644
--- a/src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java
+++ b/src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java
@@ -82,7 +82,7 @@ public class RichLinkView extends RelativeLayout {
textViewTitle = findViewById(R.id.rich_link_title);
textViewDesp = findViewById(R.id.rich_link_desp);
imageView.setAdjustViewBounds(true);
- if (!meta.getImageurl().equals("") && !meta.getImageurl().isEmpty()) {
+ if (meta.getImageurl() != null && !meta.getImageurl().equals("") && !meta.getImageurl().isEmpty()) {
if (!dataSaverDisabled) {
Picasso.get()
.load(R.drawable.ic_web_grey600_48)
@@ -94,6 +94,7 @@ public class RichLinkView extends RelativeLayout {
.resize(80, 80)
.centerInside()
.placeholder(R.drawable.ic_web_grey600_48)
+ .error(R.drawable.ic_web_grey600_48)
.into(imageView);
}
} else {
diff --git a/src/main/java/de/pixart/messenger/utils/RichPreview.java b/src/main/java/de/pixart/messenger/utils/RichPreview.java
index cdde6baaa..7824478d6 100644
--- a/src/main/java/de/pixart/messenger/utils/RichPreview.java
+++ b/src/main/java/de/pixart/messenger/utils/RichPreview.java
@@ -177,7 +177,7 @@ public class RichPreview {
doc = Jsoup.connect(url)
.timeout(Config.CONNECT_TIMEOUT * 1000)
.get();
- } catch (IOException e) {
+ } catch (Exception e) {
e.printStackTrace();
}