aboutsummaryrefslogtreecommitdiffstats
path: root/src/standardPush/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-08-31 14:54:53 +0200
committerChristian Schneppe <christian@pix-art.de>2019-08-31 14:54:53 +0200
commit58b464cf268e156fa4295a8a5c58dddc0a467394 (patch)
treebd0a4a586010cafe3e1b0a9b5482accde47d473e /src/standardPush/java/de/pixart/messenger
parent8b63dbb26d5f5d81ad631c6cb8629cb5637df0ea (diff)
catch fcm library bugs
Diffstat (limited to 'src/standardPush/java/de/pixart/messenger')
-rw-r--r--src/standardPush/java/de/pixart/messenger/services/PushManagementService.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/standardPush/java/de/pixart/messenger/services/PushManagementService.java b/src/standardPush/java/de/pixart/messenger/services/PushManagementService.java
index 13251ce6a..5660b5f84 100644
--- a/src/standardPush/java/de/pixart/messenger/services/PushManagementService.java
+++ b/src/standardPush/java/de/pixart/messenger/services/PushManagementService.java
@@ -150,7 +150,13 @@ public class PushManagementService {
if (!task.isSuccessful()) {
Log.d(Config.LOGTAG, "unable to get Firebase instance token", task.getException());
}
- final InstanceIdResult result = task.getResult();
+ final InstanceIdResult result;
+ try {
+ result = task.getResult();
+ } catch (Exception e) {
+ Log.d(Config.LOGTAG, "unable to get Firebase instance token due to bug in library ", e);
+ return;
+ }
if (result != null) {
instanceTokenRetrieved.onGcmInstanceTokenRetrieved(result.getToken());
}