diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-08-31 14:54:53 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-08-31 14:54:53 +0200 |
commit | 58b464cf268e156fa4295a8a5c58dddc0a467394 (patch) | |
tree | bd0a4a586010cafe3e1b0a9b5482accde47d473e /src/standardPush/java/de/pixart/messenger | |
parent | 8b63dbb26d5f5d81ad631c6cb8629cb5637df0ea (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.java | 8 |
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()); } |