From 27f5dc852019bcb4434cecd50e9235dfe34aa620 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sun, 31 Mar 2019 11:23:59 +0200 Subject: catch exceptions in NotificationService --- .../java/de/pixart/messenger/services/NotificationService.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java index e039dbf36..40c848c66 100644 --- a/src/main/java/de/pixart/messenger/services/NotificationService.java +++ b/src/main/java/de/pixart/messenger/services/NotificationService.java @@ -15,6 +15,7 @@ import android.media.AudioAttributes; import android.media.RingtoneManager; import android.net.Uri; import android.os.Build; +import android.os.DeadSystemException; import android.os.SystemClock; import android.preference.PreferenceManager; import android.support.annotation.RequiresApi; @@ -961,7 +962,12 @@ public class NotificationService { } private PendingIntent createOpenConversationsIntent() { - return PendingIntent.getActivity(mXmppConnectionService, 0, new Intent(mXmppConnectionService, ConversationsActivity.class), 0); + try { + return PendingIntent.getActivity(mXmppConnectionService, 0, new Intent(mXmppConnectionService, ConversationsActivity.class), 0); + } catch (Exception e) { + e.printStackTrace(); + return null; + } } void updateErrorNotification() { -- cgit v1.2.3