aboutsummaryrefslogtreecommitdiffstats
path: root/src/standardPush
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-11-08 22:24:44 +0100
committerChristian Schneppe <christian@pix-art.de>2018-11-08 22:24:44 +0100
commitf0e96ca60df9440b30fd5107160786e72a27f617 (patch)
tree8708f4765543cf6729d3d5fca59d95769ea961a0 /src/standardPush
parent9caca380b41ddb557207663e65d9d7040708d1a5 (diff)
try to catch exceptions on FCM token refresh
Diffstat (limited to 'src/standardPush')
-rw-r--r--src/standardPush/java/de/pixart/messenger/services/InstanceIdService.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/standardPush/java/de/pixart/messenger/services/InstanceIdService.java b/src/standardPush/java/de/pixart/messenger/services/InstanceIdService.java
index 3e9a00a3c..d812105aa 100644
--- a/src/standardPush/java/de/pixart/messenger/services/InstanceIdService.java
+++ b/src/standardPush/java/de/pixart/messenger/services/InstanceIdService.java
@@ -1,15 +1,24 @@
package de.pixart.messenger.services;
import android.content.Intent;
+import android.support.v4.content.ContextCompat;
+import android.util.Log;
import com.google.firebase.iid.FirebaseInstanceIdService;
+import de.pixart.messenger.Config;
+import de.pixart.messenger.utils.Compatibility;
+
public class InstanceIdService extends FirebaseInstanceIdService {
@Override
public void onTokenRefresh() {
Intent intent = new Intent(this, XmppConnectionService.class);
intent.setAction(XmppConnectionService.ACTION_FCM_TOKEN_REFRESH);
- startService(intent);
+ try {
+ startService(intent);
+ } catch (Exception e) {
+ Log.e(Config.LOGTAG, "unable to refresh FCM token", e);
+ }
}
}