catch fcm library bugs

This commit is contained in:
Christian Schneppe 2019-08-31 14:54:53 +02:00
parent 8b63dbb26d
commit 58b464cf26

View file

@ -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());
}